Skip to content

Add changelog entry for smart contract upgrade verification #404

Add changelog entry for smart contract upgrade verification

Add changelog entry for smart contract upgrade verification #404

Workflow file for this run

name: Voucher Smart Contract CI
on:
push:
branches: ["**"]
jobs:
default:
strategy:
matrix:
os: [ubuntu-latest]
node-version: [18,20]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Check Format
run: npm run check-format
- name: Generate UML
run: npm run uml
- name: Setup Foundry Toolchain
uses: foundry-rs/foundry-toolchain@v1
- name: Start Bellecour Fork
run: |
nohup anvil --host 0.0.0.0 --port 8545 --hardfork berlin --fork-url https://bellecour.iex.ec --chain-id 134 --gas-limit 6700000 --gas-price 0 &
- name: Wait for Fork
timeout-minutes: 2
run: |
while ! nc -z 127.0.0.1 8545; do sleep 1; done
echo "Bellecour fork ready"
- name: Run Upgrade Test
env:
FACTORY: false
IS_LOCAL_FORK: true
run: npm run upgrade-local-fork
- name: Run Tests
run: npm run test --bail
- name: Run Coverage
run: npm run coverage #coverage only work on a non-fork hardhat node
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: iExecBlockchainComputing/iexec-voucher-contracts
- name: Run static analysis with slither
uses: crytic/[email protected]
with:
target: "contracts/"
slither-args: --checklist --markdown-root ${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/
fail-on: none # TODO set this to high or other
sarif: results.sarif
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif