Skip to content

Arbitrum Governor V2 upgrade: contracts, scripts, tests #1225

Arbitrum Governor V2 upgrade: contracts, scripts, tests

Arbitrum Governor V2 upgrade: contracts, scripts, tests #1225

Workflow file for this run

on: [pull_request]
name: Build and test
jobs:
test-unit:
name: Test unit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: Install packages
run: yarn
- name: Run tests
run: make test
test-contract-size:
name: Test contract size
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: Install packages
run: yarn
- name: Run build --sizes
run: FOUNDRY_PROFILE=sec_council_mgmt forge build --sizes
test-gas:
name: Test gas
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install packages
run: yarn
- name: Check gas snapshot
run: make gas-check
test-action-storage:
name: Test action storage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Install packages
run: yarn
- name: Check if jq is installed
run: jq --version
- name: Check action storage
run: make test-action-storage
test-only-doesnt-exist:
name: No .only
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Check if .only exists in integration test
run: fgrep .only -R test-ts/ && exit 1 || exit 0
test-deploy:
name: Test deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: OffchainLabs/actions/run-nitro-test-node@main
with:
no-token-bridge: true
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: Install packages
run: yarn
- name: Copy .env
run: |
cp ./files/local/.env-sample ./.env
- name: Compile contracts
run: yarn build
- name: Generate network file
run: yarn gen:network
- name: Generate nova network file
run: yarn gen:nova:network
- name: Deploy governance
run: yarn deploy:governance
- name: Verify deployment
run: yarn verify:governance
- name: Allocate tokens
run: yarn allocate:tokens
- name: Verify token distribution partial
run: yarn verify:distribution:partial
- name: Verify token distribution full
run: yarn verify:distribution:full
- name: Allocate DAO tokens
run: yarn allocate:dao:tokens
- name: Verify DAO token distribution
run: yarn verify:dao:distribution
- name: Proposal tests
run: yarn test:proposals
test-integration:
name: Test integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: OffchainLabs/actions/run-nitro-test-node@main
with:
no-token-bridge: true
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: Install packages
run: yarn
- name: Copy .env
run: |
cp ./files/local/.env-sample ./.env
- name: Compile contracts
run: yarn build
- name: Generate network file
run: yarn gen:network
- name: Run integration tests
run: yarn test:integration