1
1
on :
2
- - pull_request
3
- - push
2
+ pull_request :
3
+ branches-ignore : gh-pages
4
+ push :
5
+ branches-ignore : gh-pages
4
6
5
7
name : build
6
8
7
9
jobs :
8
- tests :
9
- name : PHP ${{ matrix.php }}-${{ matrix.os }}-${{ matrix.coverage }}
10
+ linux :
11
+ name : PHP ${{ matrix.php }}-${{ matrix.os }}
10
12
11
13
env :
12
14
extensions : curl, mbstring, openssl, pdo, pdo_sqlite
13
15
SYMFONY_DEPRECATIONS_HELPER : weak
14
16
15
17
runs-on : ${{ matrix.os }}
16
18
17
- continue-on-error : ${{ matrix.experimental }}
18
-
19
19
strategy :
20
20
fail-fast : false
21
21
matrix :
22
22
os : [ubuntu-latest]
23
- php : ["5.6", "7.0", "7.1", "7.2"]
24
- coverage : [xdebug]
25
- experimental : [false]
26
- include :
27
- - os : ubuntu-latest
28
- php : " 7.3"
29
- coverage : pcov
30
- experimental : true
31
- - os : ubuntu-latest
32
- php : " 7.4"
33
- coverage : pcov
34
- experimental : true
35
- - os : ubuntu-latest
36
- php : " 8.0"
37
- coverage : pcov
38
- experimental : true
23
+ php : ["5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"]
39
24
40
25
steps :
41
26
- name : Checkout
42
- uses : actions/checkout@v2.3.4
27
+ uses : actions/checkout@v2
43
28
44
29
- name : Install PHP
45
30
uses : shivammathur/setup-php@v2
46
31
with :
47
32
php-version : ${{ matrix.php }}
48
33
extensions : ${{ env.extensions }}
49
34
ini-values : memory_limit=-1, date.timezone='UTC'
50
- coverage : ${{ matrix.coverage }}
35
+ coverage : xdebug
51
36
tools : composer:v2
52
37
53
- - name : Determine composer cache directory on Linux
54
- if : matrix.os == 'ubuntu-latest'
38
+ - name : Determine composer cache directory
55
39
run : echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
56
40
57
- - name : Determine composer cache directory on Windows
58
- if : matrix.os == 'windows-latest'
59
- run : echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
60
-
61
41
- name : Cache dependencies installed with composer
62
42
uses : actions/cache@v2
63
43
with :
75
55
- name : Composer install
76
56
run : composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
77
57
78
- - name : Run tests PHP 5.6, 7.0, 7.1, 7.3, 8.0
79
- if : matrix.php != '7.2 ' || matrix.php != '7.4 '
58
+ - name : Run tests PHP 5.6, 7.0, 7.1, 7.3
59
+ if : matrix.php == '56' || matrix.php == '7.0 ' || matrix.php == '7.1' || matrix.php == '7.3 '
80
60
run : |
81
61
php -S 127.0.0.1:8000 -t tests/data/app >/dev/null 2>&1 &
82
62
php codecept build
87
67
run : |
88
68
php -S 127.0.0.1:8000 -t tests/data/app -d pcov.directory=$(pwd)/tests/data/app >/dev/null 2>&1 &
89
69
php codecept build
90
- php codecept run cli,unit,coverage --env COVERAGE=1
70
+ php codecept run cli,unit,coverage --env COVERAGE=1
71
+
72
+ - name : Run tests PHP 8.0
73
+ if : matrix.php == '8.0'
74
+ continue-on-error : true
75
+ run : |
76
+ php -S 127.0.0.1:8000 -t tests/data/app -d pcov.directory=$(pwd)/tests/data/app >/dev/null 2>&1 &
77
+ php codecept build
78
+ php codecept run cli,unit,coverage --env COVERAGE=1
79
+
80
+ windows-latest :
81
+ name : PHP ${{ matrix.php }}-${{ matrix.os }}
82
+
83
+ env :
84
+ extensions : curl, mbstring, openssl, pdo, pdo_sqlite
85
+ SYMFONY_DEPRECATIONS_HELPER : weak
86
+
87
+ runs-on : ${{ matrix.os }}
88
+
89
+ strategy :
90
+ fail-fast : false
91
+ matrix :
92
+ os : [windows-latest]
93
+
94
+ php : ["7.1"]
95
+
96
+ steps :
97
+ - name : Checkout
98
+ uses : actions/checkout@v2
99
+
100
+ - name : Install PHP
101
+ uses : shivammathur/setup-php@v2
102
+ with :
103
+ php-version : ${{ matrix.php }}
104
+ extensions : ${{ env.extensions }}
105
+ ini-values : memory_limit=-1, date.timezone='UTC'
106
+ tools : composer:v2
107
+
108
+ - name : Determine composer cache directory
109
+ run : echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
110
+
111
+ - name : Cache dependencies installed with composer
112
+ uses : actions/cache@v2
113
+ with :
114
+ path : ${{ env.COMPOSER_CACHE_DIR }}
115
+ key : php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
116
+ restore-keys : |
117
+ php${{ matrix.php }}-composer-
118
+
119
+ - name : Update composer
120
+ run : composer self-update
121
+
122
+ - name : Validate composer.json
123
+ run : composer validate
124
+
125
+ - name : Composer install
126
+ run : composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
127
+
128
+ - name : Run tests cli
129
+ run : php codecept run cli --skip-group coverage
130
+
131
+ - name : Run tests unit
132
+ run : php codecept run unit -g core -g appveyor
0 commit comments