xref: /webtrees/.github/workflows/phpunit.yaml (revision e9bf9257f4d7d201897d39404a8db546acc6b6f9)
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:
13*e9bf9257SGreg Roach        operating-system: ['ubuntu-latest']
147c7db574SGreg Roach        php-version: ['8.1', '8.2', '8.3', '8.4']
15afa2be90SGreg Roach      fail-fast: false
169b152ff9SGreg Roach
179b152ff9SGreg Roach    steps:
189b152ff9SGreg Roach      - uses: shivammathur/setup-php@master
199b152ff9SGreg Roach        with:
209b152ff9SGreg Roach          php-version: ${{ matrix.php-version }}
211792ff1cSGreg Roach          extensions: gd,intl,mbstring,sqlite,zip
229b152ff9SGreg Roach          coverage: pcov
239b152ff9SGreg Roach
24*e9bf9257SGreg Roach      - uses: actions/checkout@v4
259b152ff9SGreg Roach
269b152ff9SGreg Roach      - run: composer validate
279b152ff9SGreg Roach
28b6017f99SGreg Roach      - run: composer install --no-progress
299b152ff9SGreg Roach
309b152ff9SGreg Roach      - run: vendor/bin/phpunit --coverage-clover=tests/coverage.xml
319b152ff9SGreg Roach
32879b2a9eSGreg Roach      - uses: codecov/codecov-action@v3
339b152ff9SGreg Roach        with:
349b152ff9SGreg Roach          token: ${{ secrets.CODECOV_TOKEN }}
359b152ff9SGreg Roach          file: tests/coverage.xml
36