Skip to content

Commit cd3cc7c

Browse files
authored
Add PHP 8.4 and PHPUnit 11.5 testing (#902)
1 parent eea2bc0 commit cd3cc7c

File tree

3 files changed

+52
-4
lines changed

3 files changed

+52
-4
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Exercise tests with PHPUnit 11
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
10+
jobs:
11+
test:
12+
name: PHP ${{ matrix.php-version }} - ${{ matrix.os }} - ${{ github.event_name }}
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
# php-version: [8.2, 8.3, 8.4]
18+
# os: [ubuntu-24.04, windows-2022, macOS-14]
19+
php-version: [8.4]
20+
os: [ubuntu-24.04]
21+
22+
steps:
23+
- name: Set git line endings
24+
if: ${{ matrix.os == 'windows-2022' }}
25+
run: |
26+
git config --system core.autocrlf false
27+
git config --system core.eol lf
28+
29+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
30+
31+
- uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e
32+
with:
33+
php-version: ${{ matrix.php-version }}
34+
extensions: gmp
35+
36+
- name: Install dependencies
37+
shell: bash
38+
run: |
39+
curl -Lo ./bin/phpunit-11.phar https://phar.phpunit.de/phpunit-11.phar
40+
chmod +x bin/phpunit-11.phar
41+
42+
- name: Test exercises
43+
continue-on-error: true
44+
shell: bash
45+
env:
46+
PHPUNIT_BIN: 'bin/phpunit-11.phar'
47+
XDEBUG_MODE: off
48+
run: bin/test.sh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The `lint:check` is included in `composer ci` to run the CI checks locally.
7474
- Follow the [PSR-12] coding style (Exercisms PHP track uses a slightly [modified][local-file-phpcs-config] version of [PSR-12]).
7575
- Run `composer ci` to run CI checks locally before pushing.
7676
- CI is run on all pull requests, it must pass the required checks for merge.
77-
- CI is running all tests on PHP 8.0 to PHP 8.2 for Linux, Windows and MacOS.
77+
- CI is running all tests on PHP 8.1 to PHP 8.4 for Linux, Windows and MacOS.
7878

7979
## Generating new practice exercises
8080

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
},
1111
"require-dev": {
1212
"php": "^8.1",
13-
"phpunit/phpunit": "^10.5",
14-
"slevomat/coding-standard": "^8.14.1",
15-
"squizlabs/php_codesniffer": "^3.11.1"
13+
"phpunit/phpunit": "^10.5 | ^11.5",
14+
"slevomat/coding-standard": "^8.19.1",
15+
"squizlabs/php_codesniffer": "^3.13.2"
1616
},
1717
"scripts": {
1818
"post-install-cmd": [

0 commit comments

Comments
 (0)