Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/exercise-tests-phpunit-11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Exercise tests with PHPUnit 11

on:
workflow_dispatch:
push:
branches:
- main
pull_request:

jobs:
test:
name: PHP ${{ matrix.php-version }} - ${{ matrix.os }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# php-version: [8.2, 8.3, 8.4]
# os: [ubuntu-24.04, windows-2022, macOS-14]
php-version: [8.4]
os: [ubuntu-24.04]
Comment thread
mk-mxp marked this conversation as resolved.

steps:
- name: Set git line endings
if: ${{ matrix.os == 'windows-2022' }}
run: |
git config --system core.autocrlf false
git config --system core.eol lf

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e
with:
php-version: ${{ matrix.php-version }}
extensions: gmp

- name: Install dependencies
shell: bash
run: |
curl -Lo ./bin/phpunit-11.phar https://phar.phpunit.de/phpunit-11.phar
chmod +x bin/phpunit-11.phar
Comment thread
mk-mxp marked this conversation as resolved.

- name: Test exercises
continue-on-error: true
Comment thread
mk-mxp marked this conversation as resolved.
shell: bash
env:
PHPUNIT_BIN: 'bin/phpunit-11.phar'
XDEBUG_MODE: off
run: bin/test.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ The `lint:check` is included in `composer ci` to run the CI checks locally.
- Follow the [PSR-12] coding style (Exercisms PHP track uses a slightly [modified][local-file-phpcs-config] version of [PSR-12]).
- Run `composer ci` to run CI checks locally before pushing.
- CI is run on all pull requests, it must pass the required checks for merge.
- CI is running all tests on PHP 8.0 to PHP 8.2 for Linux, Windows and MacOS.
- CI is running all tests on PHP 8.1 to PHP 8.4 for Linux, Windows and MacOS.

## Generating new practice exercises

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
},
"require-dev": {
"php": "^8.1",
"phpunit/phpunit": "^10.5",
"slevomat/coding-standard": "^8.14.1",
"squizlabs/php_codesniffer": "^3.11.1"
"phpunit/phpunit": "^10.5 | ^11.5",
"slevomat/coding-standard": "^8.19.1",
"squizlabs/php_codesniffer": "^3.13.2"
},
"scripts": {
"post-install-cmd": [
Expand Down