Use more up to date OZ library #373
Workflow file for this run
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: CI | |
on: pull_request | |
jobs: | |
lint-l1: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ethereum | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.18.0 | |
cache: yarn | |
cache-dependency-path: ethereum/yarn.lock | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: yarn install | |
- name: Lint | |
run: yarn lint:check | |
lint-l2: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: zksync | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.18.0 | |
cache: yarn | |
cache-dependency-path: zksync/yarn.lock | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: yarn install | |
- name: Lint | |
run: yarn lint:check | |
build-l1: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ethereum | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.18.0 | |
cache: yarn | |
cache-dependency-path: ethereum/yarn.lock | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: yarn install | |
- name: Build artifacts | |
run: yarn build | |
- name: Create cache | |
uses: actions/cache/save@v3 | |
with: | |
key: artifacts-${{ github.sha }} | |
path: | | |
ethereum/artifacts | |
ethereum/cache | |
ethereum/typechain | |
build-l2: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: zksync | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.18.0 | |
cache: yarn | |
cache-dependency-path: zksync/yarn.lock | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: yarn install | |
- name: Build artifacts | |
run: yarn build | |
- name: Create cache | |
uses: actions/cache/save@v3 | |
with: | |
key: artifacts-zk-${{ github.sha }} | |
path: | | |
zksync/artifacts-zk | |
zksync/cache-zk | |
zksync/typechain | |
test-hardhat-l1: | |
needs: [build-l1, lint-l1] | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ethereum | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.18.0 | |
cache: yarn | |
cache-dependency-path: ethereum/yarn.lock | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: yarn install | |
- name: Restore artifacts cache | |
uses: actions/cache/restore@v3 | |
with: | |
fail-on-cache-miss: true | |
key: artifacts-${{ github.sha }} | |
path: | | |
ethereum/artifacts | |
ethereum/cache | |
ethereum/typechain | |
- name: Run tests | |
run: yarn test --no-compile | |
test-foundry-l1: | |
needs: [build-l1, lint-l1] | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ethereum | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- name: "Install Foundry" | |
uses: "foundry-rs/foundry-toolchain@v1" | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.18.0 | |
cache: yarn | |
cache-dependency-path: ethereum/yarn.lock | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: yarn install | |
- name: Restore artifacts cache | |
uses: actions/cache/restore@v3 | |
with: | |
fail-on-cache-miss: true | |
key: artifacts-${{ github.sha }} | |
path: | | |
ethereum/artifacts | |
ethereum/cache | |
ethereum/typechain | |
- name: Run tests | |
run: forge test | |
test-hardhat-l2: | |
needs: [build-l1, build-l2, lint-l2] | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: zksync | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.18.0 | |
cache: yarn | |
cache-dependency-path: zksync/yarn.lock | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: yarn install | |
- name: Install L1 dependencies | |
working-directory: ethereum | |
run: yarn install | |
- name: Restore L1 artifacts cache | |
uses: actions/cache/restore@v3 | |
with: | |
fail-on-cache-miss: true | |
key: artifacts-${{ github.sha }} | |
path: | | |
ethereum/artifacts | |
ethereum/cache | |
ethereum/typechain | |
- name: Restore artifacts cache | |
uses: actions/cache/restore@v3 | |
with: | |
fail-on-cache-miss: true | |
key: artifacts-zk-${{ github.sha }} | |
path: | | |
zksync/artifacts-zk | |
zksync/cache-zk | |
zksync/typechain | |
- name: Run Era test node | |
uses: dutterbutter/era-test-node-action@latest | |
- name: Run tests | |
run: yarn hardhat test | |
check-verifier-generator: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.72.0 | |
- name: Generete Verifier.sol | |
working-directory: tools | |
run: cargo run | |
- name: Compare | |
run: diff tools/data/Verifier.sol ethereum/contracts/zksync/Verifier.sol |