-
-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: split sim tests to multiple jobs (#6437)
* Reuse build actions * Split sim tests to multiple jobs * Improve sim test build time with cache * Lint edited files --------- Co-authored-by: Nico Flaig <nflaig@protonmail.com>
- Loading branch information
1 parent
d01c542
commit 17b4fde
Showing
3 changed files
with
202 additions
and
178 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,58 @@ | ||
name: "Setup and build the repo" | ||
description: "A task to reuse setup steps during multiple jobs" | ||
inputs: | ||
node: | ||
description: Node version | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{inputs.node}} | ||
check-latest: true | ||
cache: yarn | ||
|
||
- name: Node.js version | ||
id: node | ||
shell: bash | ||
run: echo "v8CppApiVersion=$(node --print "process.versions.modules")" >> $GITHUB_OUTPUT | ||
|
||
- name: Restore build | ||
uses: actions/cache/restore@v4 | ||
id: cache-build-restore | ||
with: | ||
path: | | ||
node_modules | ||
packages/*/node_modules | ||
lib/ | ||
packages/*/lib | ||
packages/*/.git-data.json | ||
key: ${{ runner.os }}-node-${{ inputs.node }}-${{ github.sha }} | ||
|
||
- name: Install & build | ||
if: steps.cache-build-restore.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: yarn install --frozen-lockfile && yarn build | ||
|
||
- name: Build | ||
if: steps.cache-build-restore.outputs.cache-hit == 'true' | ||
shell: bash | ||
run: yarn build | ||
|
||
- name: Check Build | ||
shell: bash | ||
run: yarn check-build | ||
|
||
- name: Cache build artifacts | ||
uses: actions/cache@master | ||
with: | ||
path: | | ||
node_modules | ||
packages/*/node_modules | ||
lib/ | ||
packages/*/lib | ||
packages/*/.git-data.json | ||
key: ${{ runner.os }}-node-${{ inputs.node }}-${{ github.sha }} |
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.