Skip to content

Commit

Permalink
Upgrade to php 8.1 (#36)
Browse files Browse the repository at this point in the history
* upgrade to php 8.1

* wip

* fix tests

* fix phpunit.xml

* debug CI

* fix test

* remove mate

* fix getBody

* debug CI

* fix CI?

* add waitime
  • Loading branch information
OlivierLamyCanuel authored Nov 21, 2024
1 parent 49c8f2a commit 589d6d3
Show file tree
Hide file tree
Showing 10 changed files with 381 additions and 254 deletions.
59 changes: 28 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,37 @@
name: CI Backend

on:
push:
branches:
- master
pull_request:
push:
branches:
- master
pull_request:

concurrency:
# Concurrency is only limited on pull requests. head_ref is only defined on PR triggers so otherwise it will use the random run id and always build all pushes.
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
# Concurrency is only limited on pull requests. head_ref is only defined on PR triggers so otherwise it will use the random run id and always build all pushes.
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read
contents: read

jobs:
phpunit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: [ "7.4", "8.0", "8.1", "8.2" ]
steps:
-
uses: actions/checkout@v3
-
name: Installing PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
-
name: Composer Install
run: composer install -o
-
name: Start test server
run: php -S 0.0.0.0:8091 ./tests/test-server.php > /dev/null 2>&1 &
-
name: PHPUnit
run: ./vendor/bin/phpunit -c ./tests/phpunit.xml.dist
phpunit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ["8.0", "8.1", "8.2"]
steps:
- uses: actions/checkout@v3
- name: Installing PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Composer Install
run: composer install -o
- name: Start test server
run: php -S 0.0.0.0:8091 ./tests/test-server.php > /dev/null 2>&1 &
- name: Waiting for server to start
run: sleep 10s
- name: PHPUnit
run: ./vendor/bin/phpunit -c ./tests/phpunit.xml.dist
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
}
],
"require": {
"php": ">=7.4",
"php": ">=8.0",
"ext-curl": "*",
"ext-json": "*",
"vanilla/garden-utils": "^1.1",
"psr/http-message": ">=1.0",
"psr/http-message": "^1.0",
"slim/psr7": "^1.6"
},
"require-dev": {
Expand Down
Loading

0 comments on commit 589d6d3

Please sign in to comment.