Skip to content

Commit

Permalink
Try updating to phpunit 10
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Devlamynck committed Dec 31, 2024
1 parent 649c78a commit a922b69
Show file tree
Hide file tree
Showing 7 changed files with 1,027 additions and 1,013 deletions.
1 change: 0 additions & 1 deletion .github/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.7'
services:
application:
user: '1001:116'
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push]

jobs:
build-and-test:
runs-on: ubuntu-18.04
runs-on: ubuntu-24.04
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
Expand All @@ -12,7 +12,7 @@ jobs:

- name: Start docker 🔧
run: |
docker-compose -f docker-compose.yml -f .github/docker-compose.yml up -d
docker compose -f docker-compose.yml -f .github/docker-compose.yml up -d
- name: Cache multiple paths
uses: actions/cache@v2
Expand All @@ -23,15 +23,15 @@ jobs:

- name: Install the dependencies 🔧
run: |
docker-compose exec -T application composer install --prefer-dist --no-interaction --no-progress
docker compose exec -T application composer install --prefer-dist --no-interaction --no-progress
- name: Execute the tests 🔧
run: |
docker-compose exec -T application php -d extension=pcov.so ./bin/phpunit --configuration phpunit.xml.dist --colors=never --coverage-clover build/logs/clover.xml
docker compose exec -T application php -d extension=pcov.so ./bin/phpunit --configuration phpunit.xml.dist --colors=never --coverage-clover build/logs/clover.xml
- name: Upload results to Coveralls 🚀
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_SECRET }}
run: |
docker-compose exec -T application composer global require twinh/php-coveralls --prefer-dist --no-interaction --no-progress
docker-compose exec -T -e COVERALLS_REPO_TOKEN="$COVERALLS_REPO_TOKEN" application /home/application/.composer/vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
docker compose exec -T application composer global require twinh/php-coveralls --prefer-dist --no-interaction --no-progress
docker compose exec -T -e COVERALLS_REPO_TOKEN="$COVERALLS_REPO_TOKEN" application /home/application/.composer/vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
4 changes: 2 additions & 2 deletions Tests/TestTrait/BeforeAndAfterTestTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class BeforeAndAfterTestTraitTest extends TestCase
{
public function testBeforeTestExecution(): void
{
$testCase = new DummyTestTrait();
$testCase = new DummyTestTrait('dummy test trait');
self::assertFalse($testCase->beforeTestExecuted);

$testCase->setUp();
Expand All @@ -27,7 +27,7 @@ public function testBeforeTestExecution(): void

public function testAfterTestExecution(): void
{
$testCase = new DummyTestTrait();
$testCase = new DummyTestTrait('dummy test trait');
self::assertFalse($testCase->afterTestExecuted);

$testCase->tearDown();
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": "^8.1",
"phpunit/phpunit": "^9.0"
"phpunit/phpunit": "^9.0 | ^10.0"
},
"require-dev": {
"symfony/orm-pack": "*",
Expand Down
Loading

0 comments on commit a922b69

Please sign in to comment.