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

Add Github actions #5

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
81 changes: 0 additions & 81 deletions .circleci/config.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
on: [push]
jobs:
run_twitter_circuit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Install Yarn dependencies
working-directory: ./packages/circuits
run: yarn install --immutable
- name: Run Tests
run: forge test --root ./packages/contracts --fork-url https://eth-goerli.g.alchemy.com/v2/${{vars.ALCHEMY_API_KEY}}

run_unit_and_e2e_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
- name: Install Yarn dependencies
working-directory: ./packages/app
run: yarn install
- name: Run test
working-directory: ./packages/app
run: yarn test
- name: Run build
working-directory: ./packages/app
run: yarn build
- name: Test Code
uses: mujo-code/[email protected]
env:
CI: "true"
with:
args: yarn workspace @zk-email/twitter-verifier test:full-e2e

1 change: 1 addition & 0 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"test": "jest --runInBand --testPathIgnorePatterns='e2e' --reporters=default --reporters=jest-junit",
"start-e2e-test-server": "serve -s dist -p 3000",
"test:e2e-ui": "CI=true jest ./tests/e2e-ui*.test.*",
"test:full-e2e": "bash scripts/full-e2e.sh",
"test:e2e-zkp": "CI=true jest ./tests/e2e-dl-zkp.test.ts"
},
"eslintConfig": {
Expand Down
2 changes: 2 additions & 0 deletions packages/app/tests/e2e-ui.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ describe("App.js", () => {
browser = await puppeteer.launch({
// headless: true,
headless: false,
args: ['--no-sandbox'],
executablePath: process.env.PUPPETEER_EXEC_PATH,
slowMo: 100
});
page = await browser.newPage();
Expand Down
4 changes: 4 additions & 0 deletions test-app-e2e.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# Execute E2E test
cd packages/app && (yarn start-e2e-test-server & yarn test:e2e-ui)
Loading