File tree Expand file tree Collapse file tree 2 files changed +93
-84
lines changed
Expand file tree Collapse file tree 2 files changed +93
-84
lines changed Original file line number Diff line number Diff line change 1+ name : " PHQL CI"
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 2 * * *' # Daily at 02:00 runs only on default branch
6+ push :
7+ paths-ignore :
8+ - ' **.md'
9+ - ' **.txt'
10+ pull_request :
11+ workflow_dispatch :
12+
13+ permissions : {}
14+
15+ concurrency :
16+ group : ${{ github.workflow }}-${{ github.ref }}
17+ cancel-in-progress : ${{ github.ref != 'refs/heads/master' }}
18+
19+ jobs :
20+ tests :
21+ name : PHP ${{ matrix.php }}
22+ runs-on : ubuntu-latest
23+
24+ permissions :
25+ contents : read
26+
27+ strategy :
28+ fail-fast : false
29+ matrix :
30+ php :
31+ - ' 8.1'
32+ - ' 8.2'
33+ - ' 8.3'
34+ - ' 8.4'
35+ - ' 8.5'
36+
37+ steps :
38+ - uses : actions/checkout@v6
39+
40+ - name : Setup PHP
41+ uses : shivammathur/setup-php@v2
42+ with :
43+ php-version : ${{ matrix.php }}
44+ extensions : mbstring
45+ coverage : none
46+ tools : composer:v2
47+ env :
48+ COMPOSER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49+
50+ - name : Validate composer.json
51+ run : composer validate --no-check-all --no-check-publish
52+
53+ - name : Install dependencies
54+ uses : ramsey/composer-install@v3
55+ with :
56+ composer-options : " --prefer-dist"
57+
58+ - name : Run tests
59+ run : composer test
60+
61+ coverage :
62+ name : Code Coverage
63+ runs-on : ubuntu-latest
64+
65+ permissions :
66+ contents : read
67+
68+ steps :
69+ - uses : actions/checkout@v6
70+
71+ - name : Setup PHP
72+ uses : shivammathur/setup-php@v2
73+ with :
74+ php-version : ' 8.3'
75+ extensions : mbstring
76+ coverage : xdebug
77+ tools : composer:v2
78+ env :
79+ COMPOSER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
80+
81+ - name : Install dependencies
82+ uses : ramsey/composer-install@v3
83+ with :
84+ composer-options : " --prefer-dist"
85+
86+ - name : Run tests with coverage
87+ run : vendor/bin/phpunit --coverage-clover coverage.xml
88+
89+ - name : Upload coverage to Codecov
90+ uses : codecov/codecov-action@v5
91+ with :
92+ file : ./coverage.xml
93+ fail_ci_if_error : false
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments