-
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 #323 from YOU54F/ffi
pact_ffi library targeting ffi branch for beta use by users
- Loading branch information
Showing
172 changed files
with
5,245 additions
and
5,015 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
BUILD_TEST_TASK_TEMPLATE: &BUILD_TEST_TASK_TEMPLATE | ||
arch_check_script: | ||
- uname -am | ||
install_script: | ||
- composer install | ||
cirrus_ci_macos_local_script: | | ||
if [ "$(uname -s)" == 'Darwin' ] && [ "$CIRRUS_CLI" == 'true' ]; then | ||
chmod +x vendor/bin/php-cs-fixer | ||
chmod +x vendor/bin/phpstan | ||
chmod +x vendor/bin/phpunit | ||
chmod +x bin/pact-stub-server/pact-stub-server | ||
fi | ||
lint_script: | ||
- composer run lint | ||
static_analysis_script: | ||
- composer run static-code-analysis | ||
test_script: | ||
- composer test | ||
|
||
linux_arm64_task: | ||
env: | ||
COMPOSER_ALLOW_SUPERUSER: 1 | ||
matrix: | ||
- VERSION: 8.2 | ||
- VERSION: 8.1 | ||
- VERSION: 8.0 | ||
container: | ||
image: php:$VERSION | ||
pre_req_script: | ||
- apt update --yes && apt install --yes zip unzip git libffi-dev | ||
- curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php | ||
- php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer | ||
- docker-php-ext-install sockets | ||
- docker-php-ext-install ffi | ||
version_check_script: | ||
- php --version | ||
<< : *BUILD_TEST_TASK_TEMPLATE | ||
|
||
macos_arm64_task: | ||
# https://www.markhesketh.com/switching-multiple-php-versions-on-macos/ | ||
env: | ||
matrix: | ||
- VERSION: 8.2 | ||
- VERSION: 8.1 | ||
- VERSION: 8.0 | ||
macos_instance: | ||
image: ghcr.io/cirruslabs/macos-ventura-base:latest | ||
pre_req_script: | ||
- brew install php@$VERSION composer | ||
version_check_script: | ||
- php --version | ||
<< : *BUILD_TEST_TASK_TEMPLATE |
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,16 @@ | ||
# Dependabot Config | ||
|
||
version: 2 | ||
updates: | ||
|
||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
|
||
# Maintain dependencies for Composer | ||
- package-ecosystem: "composer" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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
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.