<#1324 chore: rewrite test workflow> Pull request ...
# pact-js-development
g
#1324 chore: rewrite test workflow Pull request opened by JP-Ellis The motivation for this is improve the speed at which the CI tasks complete in the Pact-JS repository. This hopefully achieves this by having more parallel builds which are each smaller and cached. I have also reduced the reliance on the scripts as it appeared to me that they duplicate a number of steps. These duplications are justified when running locally to ensure all previous steps are run, but in CI it likely results in longer runs thhan necessary. EDIT: I clearly don't understand NPM's scripts all that well, as
npm run dist
runs a lot of other functions which are unnecessary in CI:
Copy code
> @pact-foundation/pact@13.2.0 predist
> npm run clean && npm run format:check && npm run lint


> @pact-foundation/pact@13.2.0 clean
> rimraf dist coverage .nyc_output logs pacts


> @pact-foundation/pact@13.2.0 format:check
> npm run format:base -- --check


> @pact-foundation/pact@13.2.0 format:base
> prettier "{src,test,examples}/**/*.{ts,js}" --check

Checking formatting...
All matched files use Prettier code style!

> @pact-foundation/pact@13.2.0 lint
> eslint --config .eslintrc.json "{src,test}/**/*.ts"


/Users/runner/work/pact-js/pact-js/src/common/request.spec.ts
I'm going to leave this PR as a draft for now and maybe come back to it later (or if anyone wants to take it on, you're welcome) pact-foundation/pact-js GitHub Actions: Test completion check GitHub Actions: Test Examples on ${{ ((startsWith(matrix.os, &#x27;macos-&#x27;) && &#x27;macOS&#x27;) || (startsWith(matrix.os, &#x27;windows-&#x27;) && &#x27;Windows&#x27;) || &#x27;Linux&#x27;) }} with Node ${{ matrix.node-version }} GitHub Actions: Test x86_64 on Windows with Node 22 GitHub Actions: Test x86_64 on Linux with Node 22 GitHub Actions: Test x86_64 on macOS with Node 22 GitHub Actions: Test x86_64 on macOS with Node 22 GitHub Actions: Test x86_64 on Windows with Node 20 GitHub Actions: Test x86_64 on Linux with Node 20 GitHub Actions: Test x86_64 on macOS with Node 20 GitHub Actions: Test x86_64 on macOS with Node 20 GitHub Actions: Test ARM64 on macOS with Node 22 GitHub Actions: Test x86_64 on Windows with Node 18 GitHub Actions: Test ARM64 on Linux with Node 22 GitHub Actions: Test x86_64 on Linux with Node 18 GitHub Actions: Test ARM64 on macOS with Node 20 GitHub Actions: Test x86_64 on macOS with Node 18 GitHub Actions: Test ARM64 on Linux with Node 20 GitHub Actions: Test x86_64 on macOS with Node 18 GitHub Actions: Test ARM64 on macOS with Node 18 GitHub Actions: Test Alpine on Linux with Node 22 GitHub Actions: Test ARM64 on Linux with Node 18 GitHub Actions: Lint GitHub Actions: Test Alpine on Linux with Node 20 GitHub Actions: Test Alpine on Linux with Node 18 ✅ 1 other check has passed 1/25 successful checks