Skip to content

Commit

Permalink
Run tests from the root directory to workaround coverage issue
Browse files Browse the repository at this point in the history
  • Loading branch information
OndraM committed Mar 11, 2021
1 parent 4b71f5c commit f34b535
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/tests.yaml
Expand Up @@ -34,11 +34,10 @@ jobs:
run: composer update --no-interaction ${{ matrix.dependencies }}

- name: Run tests
working-directory: ./src-tests/
env:
COLUMNS: 120
run: |
../vendor/bin/phpunit --exclude-group integration --coverage-clover ./logs/clover.xml
./vendor/bin/phpunit --configuration ./src-tests/phpunit.xml --exclude-group integration --coverage-clover ./src-tests/logs/clover.xml
- name: Submit coverage to Coveralls
env:
Expand Down Expand Up @@ -78,12 +77,11 @@ jobs:
while ! nc -z localhost 4444 </dev/null; do echo Waiting for Selenium server to start...; sleep 1; done
- name: Run tests
working-directory: ./src-tests/
env:
COLUMNS: 120
SELENIUM_SERVER_URL: http://127.0.0.1:4444/wd/hub
run: |
../vendor/bin/phpunit --group integration --coverage-clover ./logs/clover.xml
./vendor/bin/phpunit --configuration ./src-tests/phpunit.xml --group integration --coverage-clover ./src-tests/logs/clover.xml
- name: Submit coverage to Coveralls
env:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -106,7 +106,7 @@
"@composer normalize --dry-run"
],
"test": [
"export COLUMNS=120 && cd src-tests && ../vendor/bin/phpunit --colors=always"
"export COLUMNS=120 && ./vendor/bin/phpunit --configuration ./src-tests/phpunit.xml --colors=always"
]
}
}

0 comments on commit f34b535

Please sign in to comment.