Skip to content

Commit

Permalink
fix: test cases in workflow and local
Browse files Browse the repository at this point in the history
  • Loading branch information
sifnoc committed Dec 3, 2024
1 parent 8c0de02 commit 24865f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,17 +291,17 @@ jobs:
uses: actions/cache@v4
with:
path: |
test-e2e/web/halo2-plonk-fibonacci
test-e2e/web/halo2-hyperplonk-fibonacci
test-e2e/web/halo2-gemini-fibonacci
test-e2e/web/mopro-pkg
key: ${{ runner.os }}-halo2-wasm-circuit-${{ hashFiles('mopro-wasm/**/*') }}
- name: Build circuits for Wasm Web app
if: steps.cache-halo2-wasm-circuit.outputs.cache-hit != 'true'
run: |
cd mopro-wasm
wasm-pack build --target web --out-dir ../test-e2e/web/halo2-plonk-fibonacci -- --features plonk
wasm-pack build --target web --out-dir ../test-e2e/web/halo2-hyperplonk-fibonacci -- --features hyperplonk
wasm-pack build --target web --out-dir ../test-e2e/web/halo2-gemini-fibonacci -- --features gemini
wasm-pack build --target web --out-dir ../test-e2e/web/mopro-pkg -- --all-features
cd ..
mkdir -p test-e2e/web/mopro-pkg/parameters
cp test-vectors/halo2/* test-e2e/web/mopro-pkg/parameters/
test-halo2-wasm-web:
runs-on: ubuntu-latest
needs:
Expand All @@ -326,9 +326,7 @@ jobs:
uses: actions/cache@v4
with:
path: |
test-e2e/web/halo2-plonk-fibonacci
test-e2e/web/halo2-hyperplonk-fibonacci
test-e2e/web/halo2-gemini-fibonacci
test-e2e/web/mopro-pkg
key: ${{ runner.os }}-halo2-wasm-circuit-${{ hashFiles('mopro-wasm/**/*') }}
- name: Install dependencies
run: yarn install
Expand Down
1 change: 1 addition & 0 deletions test-e2e/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ <h1 style="text-align: center;">WASM Browser Test</h1>
}

if (error) {
allPassed = false;
document.getElementById(`${testName}-error`).textContent = error;
} else {
document.getElementById(`${testName}-pass`).textContent = data.isValid ? "true" : "false";
Expand Down
2 changes: 1 addition & 1 deletion test-e2e/web/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const chrome = require('selenium-webdriver/chrome');
const driverVersion = await driver.executeScript('return navigator.userAgent');
console.log(`WebDriver user agent: ${driverVersion}`);

await driver.get('http://localhost:3000');
await driver.get('http://localhost:36531');

// Wait for the test completion marker
const statusDiv = await driver.findElement(By.id('test-status'));
Expand Down

0 comments on commit 24865f6

Please sign in to comment.