xref: /webtrees/.github/workflows/phpunit.yaml (revision 7c7db574d0bdf9952c8ec99186bddc01aa06fd48)
19b152ff9SGreg Roachname: Unit tests
29b152ff9SGreg Roach
39b152ff9SGreg Roachon: [push, pull_request]
49b152ff9SGreg Roach
59b152ff9SGreg Roachjobs:
69b152ff9SGreg Roach  run:
7b408d467SGreg Roach    if: ${{ !startsWith(github.event.head_commit.message, 'Translation:') }}
89b152ff9SGreg Roach    runs-on: ${{ matrix.operating-system }}
965420c9cSGreg Roach    name: Testing PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }}
109b152ff9SGreg Roach
119b152ff9SGreg Roach    strategy:
129b152ff9SGreg Roach      matrix:
13d80c4b28SGreg Roach        operating-system: [ubuntu-latest]
14*7c7db574SGreg Roach        php-version: ['8.1', '8.2', '8.3', '8.4']
159b152ff9SGreg Roach
169b152ff9SGreg Roach    steps:
179b152ff9SGreg Roach      - uses: shivammathur/setup-php@master
189b152ff9SGreg Roach        with:
199b152ff9SGreg Roach          php-version: ${{ matrix.php-version }}
201792ff1cSGreg Roach          extensions: gd,intl,mbstring,sqlite,zip
219b152ff9SGreg Roach          coverage: pcov
229b152ff9SGreg Roach
23879b2a9eSGreg Roach      - uses: actions/checkout@v3
249b152ff9SGreg Roach
259b152ff9SGreg Roach      - run: composer validate
269b152ff9SGreg Roach
27b6017f99SGreg Roach      - run: composer install --no-progress
289b152ff9SGreg Roach
299b152ff9SGreg Roach      - run: vendor/bin/phpunit --coverage-clover=tests/coverage.xml
309b152ff9SGreg Roach
31879b2a9eSGreg Roach      - uses: codecov/codecov-action@v3
329b152ff9SGreg Roach        with:
339b152ff9SGreg Roach          token: ${{ secrets.CODECOV_TOKEN }}
349b152ff9SGreg Roach          file: tests/coverage.xml
35