Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Nightly Integration testing #2596

Merged
merged 19 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .actrc

This file was deleted.

11 changes: 11 additions & 0 deletions .github/NIGHTLY_BUILD_FAILURE.md
kevaundray marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "nightly test-integration failed"
assignees: kobyhallx, phated, tomafrench, jonybur
labels: bug
---

Something broke our nightly integration test.

Check the [build]({{env.WORKFLOW_URL}}) workflow for details.

This issue was raised by the workflow `{{env.WORKFLOW_NAME}}`
28 changes: 12 additions & 16 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
CACHED_PATH: /tmp/nix-cache

steps:

- name: Checkout noir sources
uses: actions/checkout@v4

Expand All @@ -34,7 +33,6 @@ jobs:
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Restore nix store cache
if: env.ACT != 'true'
uses: actions/cache/restore@v3
id: cache
with:
Expand All @@ -43,7 +41,7 @@ jobs:

# Based on https://github.com/marigold-dev/deku/blob/b5016f0cf4bf6ac48db9111b70dd7fb49b969dfd/.github/workflows/build.yml#L26
- name: Copy cache into nix store
if: steps.cache.outputs.cache-hit == 'true' && env.ACT != 'true'
if: steps.cache.outputs.cache-hit == 'true'
# We don't check the signature because we're the one that created the cache
run: |
for narinfo in ${{ env.CACHED_PATH }}/*.narinfo; do
Expand All @@ -59,7 +57,6 @@ jobs:
echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV

- name: Upload `noir_wasm` artifact
if: env.ACT != 'true'
uses: actions/upload-artifact@v3
with:
name: noir_wasm
Expand All @@ -74,7 +71,6 @@ jobs:
echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV

- name: Upload `noirc_abi_wasm` artifact
if: env.ACT != 'true'
uses: actions/upload-artifact@v3
with:
name: noirc_abi_wasm
Expand All @@ -90,23 +86,12 @@ jobs:
echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV

- name: Upload `acvm_js` artifact
if: env.ACT != 'true'
uses: actions/upload-artifact@v3
with:
name: acvm_js
path: ${{ env.UPLOAD_PATH }}
retention-days: 3

- name: Install Yarn (local)
if: env.ACT == 'true'
run: npm install -g yarn

# - name: Install `playwright` deps
# working-directory: ./crates/integration-tests
# run: |
# npx playwright install
# npx playwright install-deps

- name: Install `integration-tests` dependencies
working-directory: ./crates/integration-tests
run: yarn install
Expand All @@ -115,3 +100,14 @@ jobs:
working-directory: ./crates/integration-tests
run: |
yarn test:browser

- name: Alert on nightly build failure
uses: JasonEtco/create-an-issue@v2
if: ${{ failure() && github.event_name == 'schedule' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW_NAME: ${{ github.workflow }}
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
update_existing: true
filename: .github/NIGHTLY_BUILD_FAILURE.md
kobyhallx marked this conversation as resolved.
Show resolved Hide resolved
1 change: 0 additions & 1 deletion crates/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"@esm-bundle/chai": "^4.3.4-fix.0",
"@web/dev-server-esbuild": "^0.3.6",
"@web/test-runner": "^0.15.3",
"@web/test-runner-playwright": "^0.10.0",
"@web/test-runner-webdriver": "^0.7.0",
"chai": "^4.3.7",
"fflate": "^0.8.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { expect } from '@esm-bundle/chai';
import { initialiseResolver } from "@noir-lang/noir-source-resolver";
import newCompiler, {
compile
compile,
init_log_level as compilerLogLevel
} from "@noir-lang/noir_wasm";
import { decompressSync as gunzip } from 'fflate';
import newABICoder, { abiEncode } from "@noir-lang/noirc_abi";
Expand All @@ -16,10 +17,13 @@ import { Barretenberg, RawBuffer, Crs } from '@aztec/bb.js';

import * as TOML from 'smol-toml'


await newCompiler();
await newABICoder();
await initACVM();

compilerLogLevel("DEBUG");

async function getFile(url: URL): Promise<string> {

const response = await fetch(url)
Expand All @@ -37,9 +41,9 @@ const test_cases = [
case: "crates/nargo_cli/tests/execution_success/1_mul"
},
// Below fails
TomAFrench marked this conversation as resolved.
Show resolved Hide resolved
// {
// case: "crates/nargo_cli/tests/execution_success/double_verify_proof"
// }
{
case: "crates/nargo_cli/tests/execution_success/double_verify_proof"
}
];

const numberOfThreads = navigator.hardwareConcurrency || 1;
Expand All @@ -64,6 +68,7 @@ test_cases.forEach((testInfo) => {
expect(noir_source).to.be.a.string;

initialiseResolver((id: String) => {
console.log("Resoving:", id);
return noir_source;
});

Expand Down
5 changes: 0 additions & 5 deletions crates/integration-tests/web-test-runner.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { fileURLToPath } from 'url';
import { esbuildPlugin } from "@web/dev-server-esbuild";
// import { playwrightLauncher } from "@web/test-runner-playwright";
import { webdriverLauncher } from '@web/test-runner-webdriver';

export default {
browsers: [
// playwrightLauncher({ product: "chromium" }),
// playwrightLauncher({ product: "webkit" }),
// playwrightLauncher({ product: "firefox" }),
webdriverLauncher({
automationProtocol: 'webdriver',
capabilities: {
Expand All @@ -29,7 +25,6 @@ export default {
testFramework: {
config: {
ui: "bdd",
// timeout: 420000,
},
},
rootDir: fileURLToPath(new URL('./../..', import.meta.url)),
Expand Down
Loading