1
1
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2
2
3
3
on :
4
- pull_request :
5
4
push :
5
+ branches :
6
+ - main
7
+ pull_request :
6
8
schedule :
7
9
- cron : ' 3 3 * * 1'
8
10
@@ -14,11 +16,11 @@ jobs:
14
16
runs-on : ubuntu-22.04
15
17
strategy :
16
18
matrix :
17
- php-version : [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
19
+ php-version : [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
18
20
19
21
steps :
20
22
- name : Checkout
21
- uses : actions/checkout@v3
23
+ uses : actions/checkout@v4
22
24
23
25
- name : Install PHP
24
26
uses : shivammathur/setup-php@v2
@@ -39,29 +41,25 @@ jobs:
39
41
strategy :
40
42
fail-fast : false
41
43
matrix :
42
- php-version : [ '5.6', '7.0', '7.1', '7.2', '7.3' ]
43
- coverage : [ 'none' ]
44
- include :
45
- - php-version : ' 7.4'
46
- coverage : xdebug
44
+ php-version : [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
47
45
48
46
steps :
49
47
- name : Checkout
50
- uses : actions/checkout@v3
48
+ uses : actions/checkout@v4
51
49
52
50
- name : Install PHP
53
51
uses : shivammathur/setup-php@v2
54
52
with :
55
53
php-version : ${{ matrix.php-version }}
56
54
ini-values : error_reporting=E_ALL
57
55
tools : composer:v2
58
- coverage : " ${{ matrix.coverage }} "
56
+ coverage : none
59
57
60
58
- name : Show the Composer configuration
61
59
run : composer config --global --list
62
60
63
61
- name : Cache dependencies installed with composer
64
- uses : actions/cache@v3
62
+ uses : actions/cache@v4
65
63
with :
66
64
path : ~/.cache/composer
67
65
key : php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
74
72
composer show;
75
73
76
74
- name : Run Tests
77
- run : ./vendor/bin/phpunit --coverage-clover build/coverage/xml
78
-
79
- - name : Upload coverage results to Codacy
80
- env :
81
- CODACY_PROJECT_TOKEN : ${{ secrets.CODACY_PROJECT_TOKEN }}
82
- if : " ${{ matrix.coverage != 'none' && env.CODACY_PROJECT_TOKEN != '' }}"
83
- run : |
84
- ./vendor/bin/codacycoverage clover build/coverage/xml
75
+ run : ./vendor/bin/phpunit
85
76
86
77
static-analysis :
87
78
name : Static Analysis
103
94
104
95
steps :
105
96
- name : Checkout
106
- uses : actions/checkout@v3
97
+ uses : actions/checkout@v4
107
98
108
99
- name : Install PHP
109
100
uses : shivammathur/setup-php@v2
@@ -116,7 +107,7 @@ jobs:
116
107
run : composer config --global --list
117
108
118
109
- name : Cache dependencies installed with composer
119
- uses : actions/cache@v3
110
+ uses : actions/cache@v4
120
111
with :
121
112
path : ~/.cache/composer
122
113
key : php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
0 commit comments