|
1 | 1 | name: Automated Tests
|
2 | 2 |
|
3 |
| -on: [push, pull_request] |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + - main |
| 8 | + tags: |
| 9 | + - 'v*' |
| 10 | + pull_request: |
4 | 11 |
|
5 | 12 | jobs:
|
6 | 13 | tests:
|
7 | 14 | name: Unit Tests (PHP ${{ matrix.php }})
|
8 | 15 | strategy:
|
9 | 16 | matrix:
|
10 |
| - php: ['8.0', '8.1', '8.2'] |
| 17 | + php: ['8.1', '8.2', '8.3', '8.4'] |
11 | 18 | runs-on: ubuntu-latest
|
12 | 19 | steps:
|
13 |
| - - uses: actions/checkout@v3 |
14 |
| - - uses: actions/cache@v3 |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + - uses: actions/cache@v4 |
15 | 22 | with:
|
16 | 23 | path: vendor
|
17 | 24 | key: vendor-${{ hashFiles('composer.json') }}
|
18 | 25 | - uses: php-actions/composer@v6
|
19 |
| - - uses: php-actions/phpunit@v3 |
| 26 | + - name: Set up PHP |
| 27 | + uses: shivammathur/setup-php@master |
20 | 28 | with:
|
21 |
| - version: 9 |
22 |
| - php_version: ${{ matrix.php }} |
23 |
| - args: --bootstrap vendor/autoload.php tests |
| 29 | + php-version: ${{ matrix.php }} |
| 30 | + coverage: pcov |
| 31 | + - name: Run test suite |
| 32 | + run: vendor/bin/phpunit tests --coverage-text --coverage-filter src |
24 | 33 |
|
25 | 34 | static:
|
26 | 35 | name: Static Analysis
|
27 | 36 | runs-on: ubuntu-latest
|
28 | 37 | steps:
|
29 |
| - - uses: actions/checkout@v3 |
30 |
| - - uses: actions/cache@v3 |
| 38 | + - uses: actions/checkout@v4 |
| 39 | + - uses: actions/cache@v4 |
31 | 40 | with:
|
32 | 41 | path: vendor
|
33 | 42 | key: vendor-${{ hashFiles('composer.json') }}
|
|
41 | 50 | name: Formatting
|
42 | 51 | runs-on: ubuntu-latest
|
43 | 52 | steps:
|
44 |
| - - uses: actions/checkout@v3 |
45 |
| - - uses: actions/cache@v3 |
| 53 | + - uses: actions/checkout@v4 |
| 54 | + - uses: actions/cache@v4 |
46 | 55 | with:
|
47 | 56 | path: vendor
|
48 | 57 | key: vendor-${{ hashFiles('composer.json') }}
|
|
0 commit comments