-
Notifications
You must be signed in to change notification settings - Fork 8
50 lines (40 loc) · 1.03 KB
/
Test.yaml
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
name: Test
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: 0 6 * * *
jobs:
Test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- 8.1
- 8.2
- 8.3
steps:
- uses: actions/checkout@v4
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
- name: Validate composer.json
run: composer validate
- name: Cache dependencies
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: php-${{ matrix.php }}
- name: Install dependencies
run: composer update --no-interaction --no-progress
- name: Run test suite with coverage
run: composer test -- --coverage-clover=build/logs/clover.xml
- name: Upload test coverage
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}