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
60 changes: 17 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,88 +5,62 @@ on: [pull_request]
jobs:

tests:
name: Tests
name: Tests (PHP ${{ matrix.php }}, ${{ matrix.dependencies }})
runs-on: ubuntu-latest
env:
MOCKSERVER_URL: 'http://localhost:1080'
services:
mockserver:
image: mockserver/mockserver
image: mockserver/mockserver:9.2.0
ports:
- "1080:1080"
env:
MOCKSERVER_INITIALIZATION_JSON_PATH: /docker/mockserver/expectations/**.json
MOCKSERVER_LOG_LEVEL: WARN
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
dependencies:
- "lowest"
- "highest"
php:
- '7.4'
- '8.0'
experimental:
- false
include:
- php: "7.4"
composer-options: ""
experimental: true
dependencies: "highest"
- php: "8.0"
composer-options: ""
experimental: true
dependencies: "highest"
- php: "8.1"
composer-options: ""
experimental: true
dependencies: "highest"
- php: "8.2"
composer-options: ""
experimental: true
dependencies: "highest"
- php: "8.3"
composer-options: ""
experimental: true
dependencies: "highest"
- php: "8.4"
composer-options: ""
experimental: true
dependencies: "highest"
- '8.2'
- '8.3'
- '8.4'
- '8.5'
steps:
- name: Set up PHP
uses: shivammathur/setup-php@2.24.0
uses: shivammathur/setup-php@2.40.0
with:
php-version: ${{ matrix.php }}
extensions: intl, mbstring
tools: "composer:v2"

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v7

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: composer update --prefer-lowest --no-interaction --no-progress --no-suggest ${{ matrix.composer-options }}
run: composer update --prefer-lowest --no-interaction --no-progress

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: composer update --no-interaction --no-progress --no-suggest ${{ matrix.composer-options }}
run: composer update --no-interaction --no-progress

- name: "Run unit tests"
run: ./vendor/bin/phpunit -c phpunit.xml

cs:
name: Codestyle check on PHP 7.4
name: Codestyle check on PHP 8.2
runs-on: ubuntu-latest
steps:
- name: Set up PHP
uses: shivammathur/setup-php@2.24.0
uses: shivammathur/setup-php@2.40.0
with:
php-version: 7.4
php-version: '8.2'

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v7

- name: Download dependencies
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
Expand All @@ -100,15 +74,15 @@ jobs:
strategy:
matrix:
php:
- '7.4'
- '8.2'
steps:
- name: Set up PHP
uses: shivammathur/setup-php@2.24.0
uses: shivammathur/setup-php@2.40.0
with:
php-version: ${{ matrix.php }}

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v7

- name: Download dependencies
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ vendor
composer.lock
.phpcs-cache
.env
var
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Get the file or files in the path, and send the content to create expectations o

### Requirements

Codecetion-MockServer Helper needs at least php 7.4 or higher and codeception 4 or higher.
Codecetion-MockServer Helper needs PHP 8.2 or higher, Codeception 5 and PHPUnit 11 or higher.

### How to contribute

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
],
"minimum-stability": "stable",
"require": {
"php": "7.4.*||8.*",
"php": "^8.2",
"guzzlehttp/guzzle": "^7.0",
"codeception/codeception": "4.*||5.*",
"phpunit/phpunit": "^8.5 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0",
"codeception/codeception": "^5.0",
"phpunit/phpunit": "^11.0 || ^12.0 || ^13.0",
"jfcherng/php-diff": "^6.14"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
tty: true
mockserver:
container_name: mockserver
image: mockserver/mockserver
image: mockserver/mockserver:9.2.0
environment:
MOCKSERVER_LOG_LEVEL: ${MOCKSERVER_LOG_LEVEL}
ports:
Expand Down
20 changes: 8 additions & 12 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheResultFile="var/phpunit/test-results"
executionOrder="depends,defects"
forceCoversAnnotation="false"
beStrictAboutCoversAnnotation="true"
cacheDirectory="var/phpunit"
executionOrder="defects"
resolveDependencies="true"
beStrictAboutCoverageMetadata="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
convertDeprecationsToExceptions="true"
failOnRisky="true"
failOnWarning="true"
verbose="true">
failOnWarning="true">
<testsuites>
<testsuite name="default">
<directory>tests</directory>
</testsuite>
</testsuites>

<coverage cacheDirectory="var/phpunit//code-coverage"
processUncoveredFiles="true">
<source>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</source>
</phpunit>
Loading