xref: /webtrees/.github/workflows/phpunit.yaml (revision 43f2f523bcb6d4090564d23802872c0679ede6bc)
1name: Unit tests
2
3on: [push, pull_request]
4
5jobs:
6  run:
7    if: ${{ !startsWith(github.event.head_commit.message, 'Translation:') }}
8    runs-on: ${{ matrix.operating-system }}
9    name: Testing PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }}
10
11    strategy:
12      matrix:
13        operating-system: [ubuntu-latest]
14        php-version: ['7.4', '8.0']
15
16    steps:
17      - uses: shivammathur/setup-php@master
18        with:
19          php-version: ${{ matrix.php-version }}
20          extensions: gd,intl,mbstring,sqlite,zip
21          coverage: pcov
22
23      - uses: actions/checkout@v2
24
25      - run: composer validate
26
27      - run: composer install --no-progress
28
29      - run: vendor/bin/phpunit --coverage-clover=tests/coverage.xml
30
31      - uses: codecov/codecov-action@v2
32        with:
33          token: ${{ secrets.CODECOV_TOKEN }}
34          file: tests/coverage.xml
35