-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #326 from pact-foundation/ffi
Pact PHP - Support for V3 / V4 + Plugins Via FFI
- Loading branch information
Showing
602 changed files
with
23,623 additions
and
6,189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Compatibility Suite | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
PACT_DO_NOT_TRACK: true | ||
|
||
jobs: | ||
v1: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
|
||
- uses: ramsey/composer-install@v3 | ||
|
||
- name: Run Behat | ||
run: vendor/bin/behat compatibility-suite/pact-compatibility-suite/features/V1 --colors | ||
v2: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
|
||
- uses: ramsey/composer-install@v3 | ||
|
||
- name: Run Behat | ||
run: vendor/bin/behat compatibility-suite/pact-compatibility-suite/features/V2 --colors | ||
v3: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
|
||
- uses: ramsey/composer-install@v3 | ||
|
||
- name: Run Behat | ||
run: vendor/bin/behat compatibility-suite/pact-compatibility-suite/features/V3 --name '/^((?!binary body \(negative|Message provider).)*$/' --colors | ||
v4: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
coverage: none | ||
|
||
- uses: ramsey/composer-install@v3 | ||
|
||
- name: Run Behat | ||
run: vendor/bin/behat compatibility-suite/pact-compatibility-suite/features/V4 --colors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -258,3 +258,4 @@ vendor/* | |
test_results | ||
pact | ||
example/output/* | ||
.phpunit.cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "compatibility-suite/pact-compatibility-suite"] | ||
path = compatibility-suite/pact-compatibility-suite | ||
url = https://github.com/pact-foundation/pact-compatibility-suite.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Pact-PHP | ||
|
||
## Pre Reqs | ||
|
||
- PHP 8.x or greater | ||
- FFI and Sockets extensions enabled in your php.ini | ||
|
||
## Steps | ||
|
||
1. Run `composer install` | ||
1. This will install php dependencies to `vendor` | ||
2. This will install pact libraries to `bin` | ||
2. Run `composer test` | ||
1. This will run our unit tests | ||
3. Run `composer lint` | ||
1. This will run the phpcs-lint | ||
4. Run `composer fix` | ||
1. This will correct any auto fixable linter errors | ||
5. Run `composer static-code-analysis` | ||
1. Run static code analysis | ||
|
||
## CI Locally | ||
|
||
### MacOS ARM | ||
|
||
#### Pre Reqs | ||
|
||
- MacOS ARM | ||
- Tart.run | ||
- Cirrus-CLI | ||
|
||
#### Steps | ||
|
||
Run all versions of PHP | ||
|
||
- `cirrus run --output github-actions macos_arm64 -e CIRRUS_CLI=true` | ||
|
||
Run a specified version of PHP | ||
|
||
- `cirrus run --output github-actions 'macos_arm64 VERSION:8.2' -e CIRRUS_CLI=true` | ||
|
||
### Linux ARM | ||
|
||
#### Pre Reqs | ||
|
||
- Docker | ||
- x86_64 or arm64/aarch64 host | ||
|
||
#### Steps | ||
|
||
Run all versions of PHP | ||
|
||
- `cirrus run --output github-actions linux_arm64` | ||
|
||
Run a specified version of PHP | ||
|
||
- `cirrus run --output github-actions 'macos_arm64 VERSION:8.2'` |
Oops, something went wrong.