<#444 CI: Test across Node 16/18/20 + arm64 MacOS ...
# pact-js-development
g
#444 CI: Test across Node 16/18/20 + arm64 MacOS test Pull request opened by YOU54F • Consolidates CI test task to use single format for all three OS's • Updates CI test task to use latest action tags (v3 checkout, v3 node) • Remove steps no longer needed (updating node-gyp) • Ensure FFI folder is deleted when running
download-libs.sh
otherwise it asks the user to confirm everytime. 🤯 • Add a developer note to download the libs, before running
npm ci
when running locally • Add macOS arm64/m1 runner test via Cirrus-CI • Requires rosetta due to using v1.x of pact-ruby-standalone • Add amd64/x86_64 linux test via Cirrus-CI in preparation for ARM64 linux testing in further PR to be raised • Test ARM64 Linux, fails as expected as per issue #416 Smells Cross CI provider and cross arch has shown a few inconsistencies in content-type matching, which is clearly demonstrable here. Haven't thought of a solution just yet, but this at least highlights and allows us to test more combinations than before
Copy code
const isWin = process.platform === 'win32';
const isLinux = process.platform === 'linux';
const isDarwinArm64 = process.platform === 'darwin' && process.arch === 'arm64';
const isLinuxArm64 = process.platform === 'linux' && process.arch === 'arm64';
const isCirrusCi = process.env['CIRRUS_CI'] === 'true';
const usesOctetStream =
  isLinuxArm64 || isWin || isDarwinArm64 || (isCirrusCi && isLinux);
See pact-foundation/pact-reference#171 for why we have an OS switch here Previous state
Windows: does not have magic mime matcher, uses content-type
OSX on CI: does not magic mime matcher, uses content-type
OSX: has magic mime matcher, sniffs content
Linux: has magic mime matcher, sniffs content
Current state
Windows: does not have magic mime matcher, uses content-type
OSX arm64: does not magic mime matcher, uses content-type
OSX x86_64: has magic mime matcher, sniffs content
OSX x86_64 - CI GitHub Actions: has magic mime matcher, sniffs content
Linux - CI Cirrus: does not have magic mime matcher, uses content-type
pact-foundation/pact-js-core ✅ All checks have passed 16/16 successful checks