-
-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (47 loc) · 1.26 KB
/
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
name: Test
on:
push:
paths:
- '**.php'
- 'composer.json'
branches:
- 'main'
pull_request:
paths:
- '**.php'
- 'composer.json'
branches:
- 'main'
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '8.1', '8.2', '8.3', '8.4' ]
continue-on-error: ${{ matrix.php == '8.4' }}
name: PHP ${{ matrix.php }} Test
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: pcov
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: composer update --prefer-dist --no-interaction
- name: Run phpcs
run: composer cs-check
- name: Execute tests
run: composer test -- --coverage-clover=coverage.xml
- name: Run codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}