Skip to content

Add type checks

Add type checks #150

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 8.4, 8.3, 8.2 ]
release: [ stable, lowest ]
include:
- php: 8.3
release: stable
coverage: true
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ~/.cache/composer/files
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Install dependencies
run: |
docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm php${{ matrix.php }} \
composer update --no-interaction --no-progress --prefer-dist --prefer-${{ matrix.release }}
- name: Run tests
run: |
docker compose -f docker-compose.yml -f docker-compose.ci.yml run --rm php${{ matrix.php }}${{ env.XDEBUG }} \
vendor/bin/phpunit ${{ env.COVERAGE }}
env:
COVERAGE: ${{ matrix.coverage && '--coverage-clover=coverage.xml' || '' }}
XDEBUG: ${{ matrix.coverage && '-xdebug' || '' }}
- name: Upload code coverage
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: matrix.coverage && env.CODECOV_TOKEN