4
4
push :
5
5
branches :
6
6
- develop
7
- - ' 4.*'
8
7
paths :
9
- - ' app/**'
10
- - ' public/**'
11
- - ' system/**'
12
- - ' tests/**'
13
8
- composer.json
14
9
- spark
15
10
- phpunit.xml.dist
18
13
pull_request :
19
14
branches :
20
15
- develop
21
- - ' 4.*'
22
16
paths :
23
- - ' app/**'
24
- - ' public/**'
25
- - ' system/**'
26
- - ' tests/**'
27
17
- composer.json
28
18
- spark
29
19
- phpunit.xml.dist
30
20
- ' **.php'
31
21
- .github/workflows/test-phpunit.yml
32
22
33
23
jobs :
34
-
35
24
tests :
25
+ name : PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }}
36
26
runs-on : ubuntu-20.04
37
27
if : " !contains(github.event.head_commit.message, '[ci skip]')"
38
- name : PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }}
39
28
40
29
strategy :
41
30
fail-fast : false
42
31
matrix :
43
- php-versions : ['7.3', '7.4', '8.0']
32
+ php-versions : ['7.3', '7.4', '8.0', '8.1' ]
44
33
db-platforms : ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV']
45
34
mysql-versions : ['5.7']
46
35
include :
47
36
- php-versions : ' 7.4'
48
37
db-platforms : MySQLi
49
38
mysql-versions : ' 8.0'
39
+ # @todo remove once 8.1 is stable enough
40
+ - php-versions : ' 8.1'
41
+ composer-flag : ' --ignore-platform-req=php'
50
42
51
43
services :
52
44
mysql :
57
49
ports :
58
50
- 3306:3306
59
51
options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
52
+
60
53
postgres :
61
54
image : postgres
62
55
env :
66
59
ports :
67
60
- 5432:5432
68
61
options : --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
62
+
69
63
mssql :
70
64
image : mcr.microsoft.com/mssql/server:2019-CU10-ubuntu-20.04
71
65
env :
@@ -75,11 +69,13 @@ jobs:
75
69
ports :
76
70
- 1433:1433
77
71
options : --health-cmd="/opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U sa -P 1Secure*Password1 -Q 'SELECT @@VERSION'" --health-interval=10s --health-timeout=5s --health-retries=3
72
+
78
73
redis :
79
74
image : redis
80
75
ports :
81
76
- 6379:6379
82
77
options : --health-cmd "redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
78
+
83
79
memcached :
84
80
image : memcached:1.6-alpine
85
81
ports :
@@ -105,6 +101,7 @@ jobs:
105
101
106
102
- name : Install latest ImageMagick
107
103
run : |
104
+ sudo apt-get update
108
105
sudo apt-get install --reinstall libgs9-common fonts-noto-mono libgs9:amd64 libijs-0.35:amd64 fonts-urw-base35 ghostscript poppler-data libjbig2dec0:amd64 gsfonts libopenjp2-7:amd64 fonts-droid-fallback ttf-dejavu-core
109
106
sudo apt-get install -y imagemagick
110
107
sudo apt-get install --fix-broken
@@ -122,13 +119,13 @@ jobs:
122
119
123
120
- name : Install dependencies
124
121
run : |
125
- composer update --ansi --no-interaction
126
- composer remove --ansi --dev --unused -W rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
122
+ composer update --ansi --no-interaction ${{ matrix.composer-flag }}
123
+ composer remove --ansi --dev --unused -W ${{ matrix.composer-flag }} -- rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
127
124
env :
128
125
COMPOSER_AUTH : ${{ secrets.COMPOSER_AUTH }}
129
126
130
- - name : Profile slow tests in PHP 7.4 MySQLi for now
131
- if : matrix.php-versions == '7.4' && matrix.db-platforms == 'MySQLi '
127
+ - name : Profile slow tests in PHP 8.0
128
+ if : matrix.php-versions == '8.0 '
132
129
run : echo "TACHYCARDIA_MONITOR_GA=enabled" >> $GITHUB_ENV
133
130
134
131
- name : Test with PHPUnit
@@ -137,8 +134,8 @@ jobs:
137
134
DB : ${{ matrix.db-platforms }}
138
135
TERM : xterm-256color
139
136
140
- - if : github.repository_owner == 'codeigniter4' && matrix.php-versions == '7.4'
141
- name : Run Coveralls
137
+ - name : Run Coveralls
138
+ if : github.repository_owner == 'codeigniter4' && matrix.php-versions == '8.0'
142
139
run : |
143
140
composer global require --ansi php-coveralls/php-coveralls:^2.4
144
141
php-coveralls --coverage_clover=build/logs/clover.xml -v
@@ -151,6 +148,7 @@ jobs:
151
148
if : github.repository_owner == 'codeigniter4'
152
149
needs : [tests]
153
150
runs-on : ubuntu-20.04
151
+
154
152
steps :
155
153
- name : Coveralls Finished
156
154
uses : coverallsapp/github-action@master
0 commit comments