-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.6 KB
/
phpunit-slicer-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: phpunit-slicer-test
on:
push:
branches: [ master ]
paths:
- 'phpunit-slicer/**'
pull_request:
branches: [ master ]
paths:
- 'phpunit-slicer/**'
defaults:
run:
working-directory: ./phpunit-slicer
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php_version: [ 81, 82, 83 ]
include:
- php_version: 83
record_coverage: true
concurrency:
group: phpunit-slicer-test-${{ github.workflow }}-${{ github.ref }}-${{ matrix.php_version }}
cancel-in-progress: true
container: ghcr.io/abenevaut/vapor-ci:php${{ matrix.php_version }}
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Configure Composer cache
id: composer-cache
uses: actions/cache@v4
with:
path: phpunit-slicer/vendor
key: ${{ runner.os }}-node-php_${{ matrix.php_version }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-node-php_${{ matrix.php_version }}-
- name: Validate Composer.json
run: composer validate --strict
- name: Composer install
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --optimize-autoloader --no-interaction --prefer-dist
- name: Test
run: php phpunit-slicer test
- name: Send coverage
if: ${{ matrix.record_coverage }}
run: codecov -f coverage/clover.xml -F phpunit-slicer
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}