ci: Improve tests + fix ci deps #2
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: "Continuous Integration" | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
test: | |
name: "Test" | |
runs-on: "ubuntu-latest" | |
strategy: | |
matrix: | |
php-version: | |
# PHPUnit v10 needs PHP 8.1, hence no way to test on older php versions | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
dependencies: | |
- "lowest" | |
- "highest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "xdebug" | |
php-version: "${{ matrix.php-version }}" | |
ini-values: "zend.assertions=1" | |
- uses: "ramsey/composer-install@v2" | |
with: | |
dependency-versions: "${{ matrix.dependencies }}" | |
- name: "Run PHPUnit" | |
run: "vendor/bin/phpunit -c phpunit.xml.dist" | |
- name: Upload coverage results to Coveralls | |
# skip php-coversalls for lowest deps | |
# it fails on lowest depedencies because old versions of guzzle doesn't work well with newer php versions | |
if: "${{ 'highest' == matrix.dependencies }}" | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v |