Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI workflow to do local scratch deployment #807

Merged
merged 20 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
61f1d6e
refactor(github flows): bump actions/checkout v3 -> v4
arwer13 Nov 22, 2023
c320f3d
refactor(github flow): bump actions/setup-node v3 -> v4
arwer13 Nov 22, 2023
ab4e81e
refactor(github flow): bump NodeJS version 16 -> 18
arwer13 Nov 22, 2023
b50aade
try forge github action to run anvil (#808)
arwer13 Nov 23, 2023
986869f
refactor: CI anvil run command and missing debug output
arwer13 Nov 23, 2023
9f13999
doc(scratch-deploy): local deploy: remove accounts.json setup step
arwer13 Nov 23, 2023
124bfd2
feat(scratch): after deploy run simple acceptance test (on fork)
arwer13 Nov 27, 2023
8becfe6
feat: on scratch deploy grant NOR's MANAGE_NODE_OPERATOR_ROLE to voting
arwer13 Nov 27, 2023
43aaa74
refactor(github flows): remove obsolete files
arwer13 Nov 27, 2023
dfe71bd
fix(github flow): attempt to fix bytecode checks (assert-bytecode.yml)
arwer13 Nov 27, 2023
abf0b8b
refactor: generate artifacts.json on CI, remove it from repo and compile
arwer13 Nov 27, 2023
fb8c68b
fix(workflows): typo in assert-bytecode.yml
arwer13 Nov 27, 2023
8581569
fix(workflows): attemp to fix storage-layout updating the action used
arwer13 Nov 28, 2023
fea112c
fix(workflow): attempt to fix assert-bytecode (ignore LidoTemplate)
arwer13 Nov 28, 2023
1c57abe
fix(workflow): 2nd attempt to fix assert-bytecode (ignore LidoTemplate)
arwer13 Nov 28, 2023
6831106
fix(workflow storage-layout-check): ignore ERC1967Proxy
arwer13 Nov 28, 2023
0801db3
fix(workflow): 3rd attempt to fix assert-bytecode (restore ignores)
arwer13 Nov 28, 2023
a0dcbdf
refactor(storage-layout-action): refer to v1 again (not dev branch)
arwer13 Nov 28, 2023
caeab68
refactor(workflow): restore assert-bytecode condition: only master
arwer13 Nov 28, 2023
2842af4
feat(scratch): assign MANAGE_NODE_OPERATOR_ROLE to agent (manager is …
arwer13 Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/deployed-bytecode-consts.js

This file was deleted.

24 changes: 0 additions & 24 deletions .github/prepare-accounts-json.py

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/analyse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup node.js version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
run: >
curl -sSL https://install.python-poetry.org | python - &&
poetry install --no-root

- name: Remove foundry.toml
run: rm -f foundry.toml

Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/assert-bytecode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,22 @@ name: Verify deployed contracts' bytecode

on:
pull_request:
branches:
- 'master'
branches: [master]

jobs:
assert-bytecode:
name: Assert deployed contracts bytecode
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup node.js version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down Expand Up @@ -49,6 +48,9 @@ jobs:
- name: Compile contracts
run: yarn compile

- name: Write config for action-verify-bytecode
run: yarn extract-artifacts

- name: Verify bytecode
uses: lidofinance/action-verify-bytecode@master
with:
Expand All @@ -64,5 +66,5 @@ jobs:
cat _actual _expected | sort | uniq -u | tee _diff
[ -s _diff ] && exit 1 || exit 0
env:
IGNORE_REGEX: test|lib|mock|interface|template|OrderedCallback|Pausable|Versioned|BeaconChainDepositor|PausableUntil
IGNORE_REGEX: test|lib|mock|interface|template|OrderedCallback|Pausable|Versioned|BeaconChainDepositor|PausableUntil|WithdrawalsManagerProxy|WithdrawalsManagerStub|ERC1967Proxy
if: ${{ always() }}
6 changes: 3 additions & 3 deletions .github/workflows/fix-abi-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup node.js version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup node.js version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down Expand Up @@ -57,14 +57,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup node.js version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-abis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup node.js version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: Get yarn cache directory path
id: yarn-cache-dir-path
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/scratch-deploy-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Scratch deploy on local clean anvil

on:
pull_request:
branches: [master, develop]

jobs:
do-scratch-deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

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

- name: Start anvil in background
# For the port see port in scripts/scratch/dao-local-deploy.sh in RPC_URL env var
run: anvil -p 8555 --mnemonic "test test test test test test test test test test test junk" &

- name: Setup node.js version
uses: actions/setup-node@v4
with:
node-version: 18

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- name: Cache yarn cache
id: cache-yarn-cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: yarn-${{ hashFiles('**/yarn.lock') }}

- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
with:
path: '**/node_modules'
key: node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: node_modules-${{ hashFiles('**/yarn.lock') }}

- name: Install modules
run: yarn
if: |
steps.cache-yarn-cache.outputs.cache-hit != 'true' ||
steps.cache-node-modules.outputs.cache-hit != 'true'

- name: Run local deploy script
run: bash scripts/scratch/dao-local-deploy.sh
7 changes: 4 additions & 3 deletions .github/workflows/storage-layout-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
name: Assert storage layout
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup node.js version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 18.x
cache: 'yarn'

- name: Submodules
Expand All @@ -32,3 +32,4 @@ jobs:
mode: check
src-folder: ./contracts
ignore-folders: '{test_helpers,template,mocks}'
ignore-contracts: 'WithdrawalsManagerProxy|WithdrawalsManagerStub|ERC1967Proxy'
6 changes: 3 additions & 3 deletions .github/workflows/storage-layout-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
name: Update storage layout
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup node.js version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 18.x
cache: 'yarn'

- name: Install yarn deps
Expand Down
Loading
Loading