Skip to content

Commit 9c35391

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into 4.3
Conflicts: system/Database/Config.php system/Database/OCI8/PreparedQuery.php
2 parents 4fc72e7 + 1fe58f0 commit 9c35391

20 files changed

+108
-56
lines changed

.github/workflows/deploy-apidocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
build:
1616
name: Deploy to api
1717
if: github.repository == 'codeigniter4/CodeIgniter4'
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-22.04
1919

2020
steps:
2121
- name: Setup credentials

.github/workflows/test-autoreview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121
jobs:
2222
auto-review-tests:
2323
name: Automatic Code Review
24-
runs-on: ubuntu-20.04
24+
runs-on: ubuntu-22.04
2525

2626
steps:
2727
- name: Checkout

.github/workflows/test-coding-standards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ concurrency:
1919
jobs:
2020
lint:
2121
name: PHP ${{ matrix.php-version }} Lint with PHP CS Fixer
22-
runs-on: ubuntu-20.04
22+
runs-on: ubuntu-22.04
2323

2424
strategy:
2525
fail-fast: false

.github/workflows/test-deptrac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ concurrency:
3131
jobs:
3232
build:
3333
name: Architectural Inspection
34-
runs-on: ubuntu-20.04
34+
runs-on: ubuntu-22.04
3535
steps:
3636
- name: Checkout
3737
uses: actions/checkout@v3

.github/workflows/test-phpcpd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ concurrency:
3030
jobs:
3131
build:
3232
name: Duplicate Code Detection
33-
runs-on: ubuntu-20.04
33+
runs-on: ubuntu-22.04
3434
steps:
3535
- name: Checkout
3636
uses: actions/checkout@v3

.github/workflows/test-phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ concurrency:
3434
jobs:
3535
build:
3636
name: PHP ${{ matrix.php-versions }} Static Analysis
37-
runs-on: ubuntu-20.04
37+
runs-on: ubuntu-22.04
3838
strategy:
3939
fail-fast: false
4040
steps:

.github/workflows/test-phpunit.yml

Lines changed: 68 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@ concurrency:
3131
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
3232
cancel-in-progress: true
3333

34+
env:
35+
COVERAGE_PHP_VERSION: '8.1'
36+
3437
jobs:
3538
tests:
3639
name: PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }}
37-
runs-on: ubuntu-20.04
40+
runs-on: ubuntu-22.04
3841
if: "!contains(github.event.head_commit.message, '[ci skip]')"
3942

4043
strategy:
@@ -69,7 +72,7 @@ jobs:
6972
options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
7073

7174
mssql:
72-
image: mcr.microsoft.com/mssql/server:2019-CU10-ubuntu-20.04
75+
image: mcr.microsoft.com/mssql/server:2022-latest
7376
env:
7477
SA_PASSWORD: 1Secure*Password1
7578
ACCEPT_EULA: Y
@@ -133,14 +136,15 @@ jobs:
133136
php-version: ${{ matrix.php-versions }}
134137
tools: composer, pecl
135138
extensions: imagick, sqlsrv, gd, sqlite3, redis, memcached, oci8, pgsql
136-
coverage: xdebug
139+
coverage: ${{ env.COVERAGE_DRIVER }}
137140
env:
138141
update: true
142+
COVERAGE_DRIVER: ${{ matrix.php-versions == env.COVERAGE_PHP_VERSION && 'xdebug' || 'none'}}
139143

140144
- name: Install latest ImageMagick
141145
run: |
142146
sudo apt-get update
143-
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
147+
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 fonts-dejavu-core
144148
sudo apt-get install -y imagemagick
145149
sudo apt-get install --fix-broken
146150
@@ -158,44 +162,84 @@ jobs:
158162
run: |
159163
composer update --ansi --no-interaction
160164
composer remove --ansi --dev --unused -W -- rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
161-
env:
162-
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
163165
164-
- name: Profile slow tests in PHP 8.0
165-
if: matrix.php-versions == '8.0'
166+
- name: Profile slow tests in PHP ${{ env.COVERAGE_PHP_VERSION }}
167+
if: matrix.php-versions == env.COVERAGE_PHP_VERSION
166168
run: echo "TACHYCARDIA_MONITOR_GA=enabled" >> $GITHUB_ENV
167169

168170
- name: Compute coverage option
169171
uses: actions/github-script@v6
170172
id: phpunit-coverage-option
171173
with:
172-
script: 'return "${{ matrix.php-versions }}" == "8.0" ? "" : "--no-coverage"'
174+
script: |
175+
const { COVERAGE_NAME } = process.env
176+
177+
return "${{ matrix.php-versions }}" == "${{ env.COVERAGE_PHP_VERSION }}" ? `--coverage-php build/cov/coverage-${COVERAGE_NAME}.cov` : "--no-coverage"
173178
result-encoding: string
179+
env:
180+
COVERAGE_NAME: php-v${{ env.COVERAGE_PHP_VERSION }}-${{ matrix.db-platforms }}
174181

175182
- name: Test with PHPUnit
176183
run: script -e -c "vendor/bin/phpunit --color=always --exclude-group=auto-review ${{ steps.phpunit-coverage-option.outputs.result }}"
177184
env:
178185
DB: ${{ matrix.db-platforms }}
179186
TERM: xterm-256color
180187

181-
- name: Run Coveralls
182-
if: github.repository_owner == 'codeigniter4' && matrix.php-versions == '8.0'
183-
run: |
184-
composer global require --ansi php-coveralls/php-coveralls:^2.4
185-
php-coveralls --coverage_clover=build/logs/clover.xml -v
188+
- name: Upload coverage file
189+
if: matrix.php-versions == env.COVERAGE_PHP_VERSION
190+
uses: actions/upload-artifact@v3
191+
with:
192+
name: ${{ env.COVERAGE_NAME }}
193+
path: build/cov/coverage-${{ env.COVERAGE_NAME }}.cov
194+
if-no-files-found: error
195+
retention-days: 1
186196
env:
187-
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
188-
COVERALLS_PARALLEL: true
189-
COVERALLS_FLAG_NAME: PHP ${{ matrix.php-versions }} - ${{ matrix.db-platforms }}
197+
COVERAGE_NAME: php-v${{ env.COVERAGE_PHP_VERSION }}-${{ matrix.db-platforms }}
190198

191-
coveralls-finish:
199+
coveralls:
192200
if: github.repository_owner == 'codeigniter4'
193-
needs: [tests]
194-
runs-on: ubuntu-20.04
201+
needs: tests
202+
runs-on: ubuntu-22.04
195203

196204
steps:
197-
- name: Coveralls Finished
198-
uses: coverallsapp/github-action@master
205+
- name: Checkout
206+
uses: actions/checkout@v3
207+
208+
- name: Setup PHP, with composer and extensions
209+
uses: shivammathur/setup-php@v2
210+
with:
211+
php-version: ${{ env.COVERAGE_PHP_VERSION }}
212+
tools: composer
213+
coverage: xdebug
214+
env:
215+
update: true
216+
217+
- name: Download coverage files
218+
uses: actions/download-artifact@v3
199219
with:
200-
github-token: ${{ secrets.GITHUB_TOKEN }}
201-
parallel-finished: true
220+
path: build/cov
221+
222+
- name: Display structure of downloaded files
223+
run: ls -R
224+
working-directory: build/cov
225+
226+
- name: Get composer cache directory
227+
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
228+
229+
- name: Cache dependencies
230+
uses: actions/cache@v3
231+
with:
232+
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
233+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
234+
restore-keys: ${{ runner.os }}-composer-
235+
236+
- name: Install dependencies
237+
run: composer update --ansi --no-interaction
238+
239+
- name: Merge coverage files
240+
run: vendor/bin/phpcov merge --clover build/logs/clover.xml build/cov
241+
242+
- name: Upload coverage to Coveralls
243+
run: vendor/bin/php-coveralls --verbose --exclude-no-stmt --ansi
244+
env:
245+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-rector.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ concurrency:
3636
jobs:
3737
build:
3838
name: PHP ${{ matrix.php-versions }} Analyze code (Rector) on ${{ matrix.paths }}
39-
runs-on: ubuntu-20.04
39+
runs-on: ubuntu-22.04
4040
strategy:
4141
fail-fast: false
4242
matrix:

.github/workflows/test-scss.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ concurrency:
2626
jobs:
2727
build:
2828
name: Compilation of SCSS (Dart Sass)
29-
runs-on: ubuntu-20.04
29+
runs-on: ubuntu-22.04
3030

3131
steps:
3232
- name: Checkout

.github/workflows/test-userguide.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ concurrency:
1717
jobs:
1818
syntax_check:
1919
name: Check User Guide syntax
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-22.04
2121

2222
steps:
2323
- name: Checkout

0 commit comments

Comments
 (0)