Skip to content

Commit

Permalink
chore: split node and browser integration tests to run in parallel (#…
Browse files Browse the repository at this point in the history
…4306)

# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

This should help cut CI times to remove the new bottleneck after #4305 

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench authored Feb 9, 2024
1 parent bf263fc commit 746b0c7
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-playwright/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
run: echo "PLAYWRIGHT_VERSION=$(yarn workspace @noir-lang/noirc_abi info @web/test-runner-playwright --json | jq .children.Version | tr -d '"')" >> $GITHUB_ENV

- name: Cache playwright binaries
uses: actions/cache@v3
uses: actions/cache@v4
id: playwright-cache
with:
path: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
set -eu

apt-get install libc++-dev -y
npx playwright install && npx playwright install-deps
yarn workspace integration-tests test
yarn workspace integration-tests test
5 changes: 5 additions & 0 deletions .github/scripts/integration-test-node.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -eu

apt-get install libc++-dev -y
yarn workspace integration-tests test
59 changes: 58 additions & 1 deletion .github/workflows/docker-test-flow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,63 @@ jobs:
- name: Test
working-directory: /usr/src/noir
run: |
./.github/scripts/integration-test.sh
./.github/scripts/integration-test-node.sh
test-integration-browser:
name: Integration test browser
runs-on: ubuntu-latest
needs: [
build-base-js,
build-noir-wasm,
build-noirc-abi,
build-acvm_js,
build-noir-js-types,
build-noir_js,
build-barretenberg-backend
]
container:
image: ghcr.io/noir-lang/noir:${{ github.sha }}-js
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
steps:
- name: Download noir wasm
uses: actions/download-artifact@v4
with:
name: noir_wasm
path: /usr/src/noir/compiler/wasm
- name: Download noirc abi
uses: actions/download-artifact@v4
with:
name: noirc_abi_wasm
path: /usr/src/noir/tooling/noirc_abi_wasm
- name: Download acvm js
uses: actions/download-artifact@v4
with:
name: acvm_js
path: /usr/src/noir/acvm-repo/acvm_js
- name: Download noir js types
uses: actions/download-artifact@v4
with:
name: noir-js-types
path: |
/usr/src/noir/tooling/noir_js_types/lib
- name: Download noir js
uses: actions/download-artifact@v4
with:
name: noir_js
path:
/usr/src/noir/tooling/noir_js/lib
- name: Download Barretenberg backend
uses: actions/download-artifact@v4
with:
name: barretenberg-backend
path:
/usr/src/noir/tooling/noir_js_backend_barretenberg/lib
- name: Test
working-directory: /usr/src/noir
run: |
./.github/scripts/integration-test-browser.sh
tests-end:
name: End
Expand All @@ -733,6 +789,7 @@ jobs:
- test-noir-wasm
- test-noir-wasm-browser
- test-integration
- test-integration-browser
- test-noir_codegen
- test-acvm_js
- test-acvm_js-browser
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ jobs:
yarn workspaces foreach -Rpt --from docs run build

- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: docs
path: ./docs/build/
Expand All @@ -106,7 +106,7 @@ jobs:
uses: actions/checkout@v4

- name: Download built docs
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: docs
path: ./docs/build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gates_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
7z a -ttar -so -an ./dist/* | 7z a -si ./nargo-x86_64-unknown-linux-gnu.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nargo
path: ./dist/*
Expand All @@ -53,7 +53,7 @@ jobs:
- uses: actions/checkout@v4

- name: Download nargo binary
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: nargo
path: ./nargo
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish-es-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: |
nix build -L .#noirc_abi_wasm
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: noirc_abi_wasm
path: |
Expand All @@ -59,7 +59,7 @@ jobs:
save-if: false

- name: Download noirc_abi_wasm package artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: noirc_abi_wasm
path: ./tooling/noirc_abi_wasm
Expand All @@ -71,7 +71,7 @@ jobs:
run: yarn workspace @noir-lang/noir_wasm build

- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: noir_wasm
path: |
Expand All @@ -98,7 +98,7 @@ jobs:
run: |
nix build -L .#acvm_js
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: acvm_js
path: |
Expand All @@ -114,17 +114,17 @@ jobs:
with:
ref: ${{ inputs.noir-ref }}

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: acvm_js
path: acvm-repo/acvm_js

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: noir_wasm
path: compiler/wasm

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: noirc_abi_wasm
path: tooling/noirc_abi_wasm
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-nargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
7z a -ttar -so -an ./dist/* | 7z a -si ./nargo-${{ matrix.target }}.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nargo-${{ matrix.target }}
path: ./dist/*
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
7z a -ttar -so -an ./dist/* | 7z a -si ./nargo-${{ matrix.target }}.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: nargo-${{ matrix.target }}
path: ./dist/*
Expand Down
Loading

0 comments on commit 746b0c7

Please sign in to comment.