44 push :
55 branches :
66 - develop
7- - ' 4.*'
87 paths :
9- - ' app/**'
10- - ' public/**'
11- - ' system/**'
12- - ' tests/**'
138 - composer.json
149 - spark
1510 - phpunit.xml.dist
1813 pull_request :
1914 branches :
2015 - develop
21- - ' 4.*'
2216 paths :
23- - ' app/**'
24- - ' public/**'
25- - ' system/**'
26- - ' tests/**'
2717 - composer.json
2818 - spark
2919 - phpunit.xml.dist
3020 - ' **.php'
3121 - .github/workflows/test-phpunit.yml
3222
3323jobs :
34-
3524 tests :
25+ name : PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }}
3626 runs-on : ubuntu-20.04
3727 if : " !contains(github.event.head_commit.message, '[ci skip]')"
38- name : PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }}
3928
4029 strategy :
4130 fail-fast : false
4231 matrix :
43- php-versions : ['7.3', '7.4', '8.0']
32+ php-versions : ['7.3', '7.4', '8.0', '8.1' ]
4433 db-platforms : ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV']
4534 mysql-versions : ['5.7']
4635 include :
4736 - php-versions : ' 7.4'
4837 db-platforms : MySQLi
4938 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'
5042
5143 services :
5244 mysql :
5749 ports :
5850 - 3306:3306
5951 options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
52+
6053 postgres :
6154 image : postgres
6255 env :
6659 ports :
6760 - 5432:5432
6861 options : --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
62+
6963 mssql :
7064 image : mcr.microsoft.com/mssql/server:2019-CU10-ubuntu-20.04
7165 env :
@@ -75,11 +69,13 @@ jobs:
7569 ports :
7670 - 1433:1433
7771 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+
7873 redis :
7974 image : redis
8075 ports :
8176 - 6379:6379
8277 options : --health-cmd "redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
78+
8379 memcached :
8480 image : memcached:1.6-alpine
8581 ports :
@@ -122,13 +118,13 @@ jobs:
122118
123119 - name : Install dependencies
124120 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
121+ composer update --ansi --no-interaction ${{ matrix.composer-flag }}
122+ composer remove --ansi --dev --unused -W ${{ matrix.composer-flag }} -- rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
127123 env :
128124 COMPOSER_AUTH : ${{ secrets.COMPOSER_AUTH }}
129125
130- - name : Profile slow tests in PHP 7.4 MySQLi for now
131- if : matrix.php-versions == '7.4' && matrix.db-platforms == 'MySQLi '
126+ - name : Profile slow tests in PHP 8.0
127+ if : matrix.php-versions == '8.0 '
132128 run : echo "TACHYCARDIA_MONITOR_GA=enabled" >> $GITHUB_ENV
133129
134130 - name : Test with PHPUnit
@@ -137,8 +133,8 @@ jobs:
137133 DB : ${{ matrix.db-platforms }}
138134 TERM : xterm-256color
139135
140- - if : github.repository_owner == 'codeigniter4' && matrix.php-versions == '7.4'
141- name : Run Coveralls
136+ - name : Run Coveralls
137+ if : github.repository_owner == 'codeigniter4' && matrix.php-versions == '8.0'
142138 run : |
143139 composer global require --ansi php-coveralls/php-coveralls:^2.4
144140 php-coveralls --coverage_clover=build/logs/clover.xml -v
@@ -151,6 +147,7 @@ jobs:
151147 if : github.repository_owner == 'codeigniter4'
152148 needs : [tests]
153149 runs-on : ubuntu-20.04
150+
154151 steps :
155152 - name : Coveralls Finished
156153 uses : coverallsapp/github-action@master
0 commit comments