-
-
Notifications
You must be signed in to change notification settings - Fork 346
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 #1098 from pact-foundation/upgrade-pact-js-core-pr…
…ebuilds-ci Upgrade pact js core prebuilds ci
- Loading branch information
Showing
43 changed files
with
9,986 additions
and
29,729 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,105 @@ | ||
env: | ||
ENABLE_FEATURE_V4: "true" | ||
SKIP_EXAMPLES: "true" | ||
LOG_LEVEL: info | ||
GIT_COMMIT: ${{ github.sha }} | ||
GIT_REF: ${{ github.ref }} | ||
|
||
BUILD_TEST_TASK_TEMPLATE: &BUILD_TEST_TASK_TEMPLATE | ||
arch_check_script: | ||
- uname -am | ||
# https://github.com/pact-foundation/pact_broker-client/blob/7edfd58c92fc234aa6aab647ef3b816a3553a412/lib/pact_broker/client/git.rb#L28-L30 | ||
# Update required for pact-broker-client to read CIRRUS env vars | ||
# so that pact-broker publish --auto-detect-version-properties | ||
# works correctly | ||
pr_script: | | ||
echo CIRRUS_PR=$CIRRUS_PR | ||
echo CIRRUS_BASE_SHA=$CIRRUS_BASE_SHA | ||
echo CIRRUS_BASE_BRANCH=$CIRRUS_BASE_BRANCH | ||
echo CIRRUS_CHANGE_IN_REPO=$CIRRUS_CHANGE_IN_REPO | ||
echo CIRRUS_BRANCH=$CIRRUS_BRANCH | ||
echo GIT_SHA=$GIT_SHA | ||
echo GIT_BRANCH=$GIT_BRANCH | ||
if [ $CIRRUS_PR ]; then | ||
echo "GIT_SHA=$CIRRUS_BASE_SHA" >> $CIRRUS_ENV | ||
echo "GIT_BRANCH=$CIRRUS_BASE_BRANCH" >> $CIRRUS_ENV | ||
else | ||
echo "GIT_SHA=$CIRRUS_CHANGE_IN_REPO" >> $CIRRUS_ENV | ||
echo "GIT_BRANCH=$CIRRUS_BRANCH" >> $CIRRUS_ENV | ||
fi | ||
pr_check_script: | | ||
echo CIRRUS_PR=$CIRRUS_PR | ||
echo CIRRUS_BASE_SHA=$CIRRUS_BASE_SHA | ||
echo CIRRUS_BASE_BRANCH=$CIRRUS_BASE_BRANCH | ||
echo CIRRUS_CHANGE_IN_REPO=$CIRRUS_CHANGE_IN_REPO | ||
echo CIRRUS_BRANCH=$CIRRUS_BRANCH | ||
echo GIT_SHA=$GIT_SHA | ||
echo GIT_BRANCH=$GIT_BRANCH | ||
build_script: | ||
- node --version | ||
- npx --yes absolute-version | ||
- scripts/ci/build-and-test.sh | ||
dist_setup_for_examples: | ||
- SETUP_DIST_ONLY=true scripts/ci/test-examples.sh | ||
# example_jest_script: | ||
# - cd examples/jest && npm install --ignore-scripts && npm test | ||
# example_mocha_script: | ||
# - cd examples/mocha && npm install --ignore-scripts && npm test | ||
example_e2e_script: | ||
- cd examples/e2e && npm install --ignore-scripts && npm test | ||
example_graphql_script: | ||
- cd examples/graphql && npm install --ignore-scripts && npm test | ||
example_messages_script: | ||
- cd examples/messages && npm install --ignore-scripts && npm test | ||
example_serverless_script: | ||
- cd examples/serverless && npm install --ignore-scripts && npm test | ||
example_typescript_script: | ||
- cd examples/typescript && npm install --ignore-scripts && npm test | ||
example_v3_e2e_script: | ||
- cd examples/v3/e2e && npm install --ignore-scripts && npm test | ||
example_v3_provider-state-injected_script: | ||
- cd examples/v3/provider-state-injected && npm install --ignore-scripts && npm test | ||
example_v3_run-specific-verifications_script: | ||
- cd examples/v3/run-specific-verifications && npm install --ignore-scripts && npm test | ||
example_v3_todo-consumer_script: | ||
- cd examples/v3/todo-consumer && npm install --ignore-scripts && npm test | ||
example_v3_typescript_script: | ||
- cd examples/v3/typescript && npm install --ignore-scripts && npm test | ||
example_v4_plugins_script: | ||
- cd examples/v4/plugins && npm install --ignore-scripts && npm test | ||
|
||
linux_arm_task: | ||
arm_container: | ||
matrix: | ||
# - image: node:slim | ||
- image: node:20.2-slim # https://github.com/nodejs/docker-node/issues/1912 | ||
- image: node:18-slim | ||
- image: node:16-slim | ||
cpu: 4 | ||
memory: 12G | ||
setup_script: | ||
- apt update --yes && apt install --yes jq git curl | ||
<< : *BUILD_TEST_TASK_TEMPLATE | ||
|
||
macos_arm_task: | ||
env: | ||
CIRRUS_SHELL: zsh | ||
NVM_DIR: "$HOME/.nvm" | ||
matrix: | ||
NODE_VERSION: 20 | ||
NODE_VERSION: 18 | ||
NODE_VERSION: 16 | ||
macos_instance: | ||
image: ghcr.io/cirruslabs/macos-ventura-base:latest | ||
setup_node_script: | | ||
if [ "$NODE_VERSION" != "20" ]; then | ||
brew uninstall node | ||
rm '/opt/homebrew/bin/npm' | ||
rm '/opt/homebrew/bin/npx' | ||
rm -rf '/opt/homebrew/lib/node_modules' | ||
brew install node@$NODE_VERSION | ||
brew link node@$NODE_VERSION | ||
fi | ||
node --version | ||
find . -name '*.sh' -exec chmod +x {} \; | ||
<< : *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
Oops, something went wrong.