Updated README #31
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: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
tests: | |
name: Tests with php${{ matrix.php }} | |
runs-on: ubuntu-latest | |
continue-on-error: false | |
strategy: | |
fail-fast: true | |
matrix: | |
php: | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up php${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: xdebug | |
- name: Install dependencies with Composer | |
uses: ramsey/composer-install@v2 | |
- name: Run tests with coverage results | |
run: vendor/bin/phpunit --coverage-clover ./tests/_output/clover.xml | |
- name: Upload coverage results to Coveralls | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_PARALLEL: true | |
COVERALLS_FLAG_NAME: ${{ matrix.php }} | |
run: | | |
composer require php-coveralls/php-coveralls -n | |
vendor/bin/php-coveralls --coverage_clover=./tests/_output/clover.xml -v --json_path=./tests/_output/coveralls-upload.json | |
finish: | |
name: Close parallel build | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Close parallel build | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel-finished: true | |
carryforward: "8.1,8.2,8.3" |