Merge pull request #708 from clrfund/fix/ipfs-url #74
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Hardhat script tests | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'contracts/scripts/**' | |
- '.github/workflows/test-scripts.yml' | |
env: | |
NODE_VERSION: 16.x | |
jobs: | |
script-tests: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Use Node.js ${{ env.NODE_VERSION }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Install g++ library dependencies | |
run: | | |
sudo apt update | |
sudo apt-get install build-essential libgmp-dev libsodium-dev nlohmann-json3-dev nasm g++ curl | |
- name: Install rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Install zkutil | |
run: | | |
cargo install zkutil --version 0.3.2 | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
with: | |
path: monorepo | |
- name: Download batch 64 params | |
run: | | |
$GITHUB_WORKSPACE/monorepo/.github/scripts/download-batch64-params.sh | |
- name: Build CLR | |
run: | | |
cd monorepo | |
yarn && yarn build | |
- name: Start hardhat network | |
run: | | |
cd monorepo | |
yarn start:node & | |
- name: Run script tests | |
run: | | |
cd monorepo/contracts | |
export NODE_CONFIG=$(node -e "const snarkParamsPath=process.env.GITHUB_WORKSPACE + '/params'; console.log(JSON.stringify({ snarkParamsPath }));") | |
echo $NODE_CONFIG | |
yarn deploy:local | |
yarn deployTestRound:local | |
yarn contribute:local | |
yarn vote:local | |
yarn hardhat evm-increase-time 1200 --network localhost | |
yarn tally:local | |
yarn finalize:local | |
yarn claim:local |