Commit 0c8d7c8c authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

contracts-bedrock: debug tests (#11397)

* contracts-bedrock: debug tests

See why the tests are flaking and cannot be reproduced locally.
Also modularize/cleanup CI along the way

* typo: fix

* debug: remove

* just: update name

* ci: better error help

* ci: fix typo

* contracts-bedrock: abstract

* ci: run with foundry profile ci
parent 7343468a
......@@ -103,6 +103,13 @@ commands:
pip3 install -r requirements.txt
python3 main.py "<<parameters.patterns>>"
install-contracts-dependencies:
description: "Install the dependencies for the smart contracts"
steps:
- run:
command: just install
working_directory: packages/contracts-bedrock
notify-failures-on-develop:
description: "Notify Slack"
parameters:
......@@ -180,9 +187,7 @@ jobs:
- run:
name: "Check L1 geth version"
command: ./ops/scripts/geth-version-checker.sh || (echo "geth version is wrong, update ci-builder"; false)
- run:
name: git submodules
command: make submodules
- install-contracts-dependencies
- restore_cache:
name: Restore PNPM Package Cache
keys:
......@@ -516,9 +521,7 @@ jobs:
resource_class: xlarge
steps:
- checkout
- run:
name: git submodules
command: make submodules
- install-contracts-dependencies
- check-changed:
patterns: contracts-bedrock,op-node
- run:
......@@ -545,11 +548,13 @@ jobs:
resource_class: xlarge
steps:
- checkout
- run:
name: git submodules
command: make submodules
- check-changed:
patterns: contracts-bedrock,op-node
- install-contracts-dependencies
- run:
name: print dependencies
command: just dep-status
working_directory: packages/contracts-bedrock
- run:
name: print forge version
command: forge --version
......@@ -561,6 +566,13 @@ jobs:
FOUNDRY_PROFILE: ci
working_directory: packages/contracts-bedrock
no_output_timeout: 15m
- run:
name: print failed test traces
command: just test-rerun
environment:
FOUNDRY_PROFILE: ci
working_directory: packages/contracts-bedrock
when: on_fail
contracts-bedrock-checks:
docker:
......@@ -568,9 +580,7 @@ jobs:
resource_class: xlarge
steps:
- checkout
- run:
name: git submodules
command: make submodules
- install-contracts-dependencies
- restore_cache:
name: Restore PNPM Package Cache
keys:
......@@ -1071,9 +1081,7 @@ jobs:
key: gomod-{{ checksum "go.sum" }}
- restore_cache:
key: golang-build-cache
- run:
name: git submodules
command: make submodules
- install-contracts-dependencies
- run:
name: generate devnet allocs
command: make devnet-allocs
......@@ -1171,9 +1179,7 @@ jobs:
name: Install pnpm
command: |
npm i pnpm --global
- run:
name: git submodules
command: make submodules
- install-contracts-dependencies
- attach_workspace:
at: "."
- when:
......@@ -1486,9 +1492,7 @@ jobs:
resource_class: xlarge
steps:
- checkout
- run:
name: Checkout Submodule
command: make submodules
- install-contracts-dependencies
- check-changed:
no_go_deps: "true"
patterns: contracts-bedrock/test/kontrol,contracts-bedrock/src/L1/OptimismPortal\.sol,contracts-bedrock/src/L1/OptimismPortal2\.sol,contracts-bedrock/src/L1/L1CrossDomainMessenger\.sol,contracts-bedrock/src/L1/L1ERC721Bridge\.sol,contracts-bedrock/src/L1/L1StandardBridge\.sol,contracts-bedrock/src/L1/ResourceMetering\.sol,contracts-bedrock/src/universal/StandardBridge\.sol,contracts-bedrock/src/universal/ERC721Bridge\.sol,contracts-bedrock/src/universal/CrossDomainMessenger\.sol
......
prebuild:
./scripts/checks/check-foundry-install.sh
dep-status:
git submodule status
install:
forge install
build: prebuild
forge build
......@@ -16,6 +22,9 @@ test: build-go-ffi
test-kontrol:
./test/kontrol/scripts/run-kontrol.sh script
test-rerun: build-go-ffi
forge test --rerun -vvv
genesis:
forge script scripts/L2Genesis.s.sol:L2Genesis --sig 'runWithStateDump()'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment