Skip to content

Commit

Permalink
feat: adding some CI to vite-hardhat
Browse files Browse the repository at this point in the history
  • Loading branch information
signorecello committed Dec 18, 2023
1 parent 0b662cd commit 65de5d7
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 22 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/vite_hardhat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: PR - vite-hardhat
on:
push:
# pull_request:
# paths:
# - 'vite-hardhat/**'

jobs:
test-vite-hardhat:
runs-on: ubuntu-latest
defaults:
run:
working-directory: vite-hardhat

steps:
- uses: actions/checkout@v4

- name: Enable Corepack before setting up Node
run: corepack enable

- uses: actions/setup-node@v4
with:
node-version: 20.10.0
cache: 'yarn'

- name: Install
run: yarn --immutable
shell: bash

- name: 'Create env file'
run: |
touch .env
echo SEPOLIA_ALCHEMY_KEY="${{ secrets.SEPOLIA_ALCHEMY_KEY }}" >> .env
echo SEPOLIA_DEPLOYER_PRIVATE_KEY="${{ secrets.SEPOLIA_DEPLOYER_PRIVATE_KEY }}" >> .env
echo MUMBAI_ALCHEMY_KEY"=${{ secrets.MUMBAI_ALCHEMY_KEY }}" >> .env
echo MUMBAI_DEPLOYER_PRIVATE_KEY="${{ secrets.MUMBAI_DEPLOYER_PRIVATE_KEY }}" >> .env
- name: Run test
run: yarn test
42 changes: 20 additions & 22 deletions .github/workflows/with_foundry.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
# a github workflow that runs curl -L https://foundry.paradigm.xyz | bash then nargo codegen-verifier then nargo prove p

name: Run Tests on PR
name: PR - with-foundry
on:
pull_request:
paths:
- 'with-foundry/**'

jobs:
test:
test-with-foundry:
defaults:
run:
working-directory: with-foundry

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Install Nargo
uses: noir-lang/[email protected]
with:
toolchain: 0.11.0
- name: Install Nargo
uses: noir-lang/[email protected]
with:
toolchain: 0.11.0

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

- name: Generate verifier contract
run: |
nargo codegen-verifier
working-directory: with-foundry/circuits
- name: Generate verifier contract
run: |
nargo codegen-verifier
working-directory: with-foundry/circuits

- name: Generate proof
run: |
nargo prove
working-directory: with-foundry/circuits
- name: Generate proof
run: |
nargo prove
working-directory: with-foundry/circuits

- name: Test with Foundry
run: |
forge test --optimize --optimizer-runs 5000 --evm-version london
- name: Test with Foundry
run: |
forge test --optimize --optimizer-runs 5000 --evm-version london

0 comments on commit 65de5d7

Please sign in to comment.