Skip to content

Commit 834b387

Browse files
committed
Add extra composer scripts to test live bot features specifically.
1 parent fd57a5c commit 834b387

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ before_script:
3737
- mysql -u root -e 'create database telegrambot; use telegrambot; source ./vendor/longman/telegram-bot/structure.sql;'
3838

3939
script:
40-
- if [[ "$COVERAGE" == "1" ]] ; then composer test-cov; fi
41-
- if [[ "$COVERAGE" != "1" ]] ; then composer test; fi
40+
- composer check-code
41+
- if [[ "$COVERAGE" == "1" ]] ; then composer test-cov-live; fi
42+
- if [[ "$COVERAGE" != "1" ]] ; then composer test-live; fi
4243

4344
after_success:
4445
- if [[ "$COVERAGE" == "1" ]]; then bash <(curl -s https://codecov.io/bash); fi

composer.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,19 @@
3636
}
3737
},
3838
"scripts": {
39+
"check-code": [
40+
"parallel-lint . --exclude vendor"
41+
],
3942
"test": [
40-
"parallel-lint . --exclude vendor",
43+
"phpunit --exclude-group live"
44+
],
45+
"test-live": [
4146
"phpunit"
4247
],
4348
"test-cov": [
44-
"parallel-lint . --exclude vendor",
49+
"phpunit --coverage-clover=coverage.xml --exclude-group live"
50+
],
51+
"test-cov-live": [
4552
"phpunit --coverage-clover=coverage.xml"
4653
]
4754
}

0 commit comments

Comments
 (0)