Tests #500
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 8 * * *' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ '8.2', '8.3' ] | |
composer-flags: [ '', '--prefer-lowest' ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build the image | |
run: dev/bin/docker-compose build --build-arg PHP_VERSION=${{ matrix.php }} php | |
- name: Install the dependencies | |
run: dev/bin/php composer update --ansi --prefer-dist ${{ matrix.composer-flags }} | |
- name: Run the tests | |
run: dev/bin/php-test composer test -- --colors=always --coverage-clover=coverage.xml --debug | |
- name: Check coding standards | |
run: dev/bin/php composer lint -- --ansi --diff --dry-run --using-cache=no --verbose | |
- name: Clear docker volumes | |
if: ${{ always() }} | |
run: dev/bin/docker-compose down --volumes | |
- name: Upload coverage to Codecov | |
if: ${{ success() }} | |
uses: codecov/codecov-action@v2 | |
with: | |
file: coverage.xml |