11name : test
22
33on :
4- push :
5- branches :
6- - main
7- - " *upstream*"
8- pull_request :
9- branches :
10- - main
11- - " *upstream*"
4+ push :
5+ branches :
6+ - main
7+ - " *upstream*"
8+ pull_request :
9+ branches :
10+ - main
11+ - " *upstream*"
1212
1313concurrency :
14- cancel-in-progress : true
15- group : ${{github.workflow}}-${{github.ref}}
14+ cancel-in-progress : true
15+ group : ${{github.workflow}}-${{github.ref}}
1616
1717env :
18- CARGO_TERM_COLOR : always
19- TARGET_RUST_VERSION : " nightly-2024-09-01"
18+ CARGO_TERM_COLOR : always
19+ TARGET_RUST_VERSION : " nightly-2024-09-01"
2020
2121jobs :
22- nextest :
23- uses : ./.github/workflows/nextest.yml
24- with :
25- profile : default
26- secrets : inherit
22+ nextest :
23+ uses : ./.github/workflows/nextest.yml
24+ with :
25+ profile : default
26+ secrets : inherit
2727
2828 doctest :
29- runs-on : ubuntu-22.04
30- timeout-minutes : 60
31- steps :
32- - uses : actions/checkout@v4
33- - uses : dtolnay/rust-toolchain@nightly
34- with :
35- toolchain : ${{ env.TARGET_RUST_VERSION }}
36- - uses : Swatinem/rust-cache@v2
37- with :
38- cache-on-failure : true
39- - name : cargo test
40- run : cargo test --doc -p forge
29+ runs-on : ubuntu-22.04
30+ timeout-minutes : 60
31+ steps :
32+ - uses : actions/checkout@v4
33+ - uses : dtolnay/rust-toolchain@nightly
34+ with :
35+ toolchain : ${{ env.TARGET_RUST_VERSION }}
36+ - uses : Swatinem/rust-cache@v2
37+ with :
38+ cache-on-failure : true
39+ - name : cargo test
40+ run : cargo test --doc -p forge
4141
4242 clippy :
43- name : clippy
44- runs-on : ubuntu-22.04
45- timeout-minutes : 60
46- steps :
47- - uses : actions/checkout@v4
48- - uses : dtolnay/rust-toolchain@clippy
49- - uses : Swatinem/rust-cache@v2
50- with :
51- cache-on-failure : true
52- - run : cargo clippy --workspace --all-targets --all-features
53- env :
54- RUSTFLAGS : -Dwarnings
43+ name : clippy
44+ runs-on : ubuntu-22.04
45+ timeout-minutes : 60
46+ steps :
47+ - uses : actions/checkout@v4
48+ - uses : dtolnay/rust-toolchain@clippy
49+ - uses : Swatinem/rust-cache@v2
50+ with :
51+ cache-on-failure : true
52+ - run : cargo clippy --workspace --all-targets --all-features
53+ env :
54+ RUSTFLAGS : -Dwarnings
5555
5656 rustfmt :
57- runs-on : ubuntu-22.04
58- timeout-minutes : 60
59- steps :
60- - uses : actions/checkout@v4
61- - uses : dtolnay/rust-toolchain@nightly
62- with :
63- toolchain : ${{ env.TARGET_RUST_VERSION }}
64- components : rustfmt
65- - run : cargo fmt --all --check
57+ runs-on : ubuntu-22.04
58+ timeout-minutes : 60
59+ steps :
60+ - uses : actions/checkout@v4
61+ - uses : dtolnay/rust-toolchain@nightly
62+ with :
63+ toolchain : ${{ env.TARGET_RUST_VERSION }}
64+ components : rustfmt
65+ - run : cargo fmt --all --check
6666
6767 forge-fmt :
68- runs-on : ubuntu-22.04
69- timeout-minutes : 60
70- steps :
71- - uses : actions/checkout@v4
72- - uses : dtolnay/rust-toolchain@nightly
73- with :
74- toolchain : ${{ env.TARGET_RUST_VERSION }}
75- - uses : Swatinem/rust-cache@v2
76- with :
77- cache-on-failure : true
78- - name : forge fmt
79- shell : bash
80- run : ./.github/scripts/format.sh --check
68+ runs-on : ubuntu-22.04
69+ timeout-minutes : 60
70+ steps :
71+ - uses : actions/checkout@v4
72+ - uses : dtolnay/rust-toolchain@nightly
73+ with :
74+ toolchain : ${{ env.TARGET_RUST_VERSION }}
75+ - uses : Swatinem/rust-cache@v2
76+ with :
77+ cache-on-failure : true
78+ - name : forge fmt
79+ shell : bash
80+ run : ./.github/scripts/format.sh --check
8181
8282 codespell :
8383 runs-on : ubuntu-22.04
@@ -89,66 +89,81 @@ jobs:
8989 skip : " *.json"
9090
9191 crate-checks :
92- # ubuntu-22.04 runs out of disk space
93- runs-on : ubuntu-22.04-github-hosted-16core
94- timeout-minutes : 60
95- steps :
96- - uses : actions/checkout@v4
97- - uses : dtolnay/rust-toolchain@nightly
98- with :
99- toolchain : ${{ env.TARGET_RUST_VERSION }}
100- - uses : taiki-e/install-action@cargo-hack
101- - uses : Swatinem/rust-cache@v2
102- with :
103- cache-on-failure : true
104- - name : cargo hack
105- run : cargo hack check
106-
92+ # ubuntu-22.04 runs out of disk space
93+ runs-on : ubuntu-22.04-github-hosted-16core
94+ timeout-minutes : 60
95+ steps :
96+ - uses : actions/checkout@v4
97+ - uses : dtolnay/rust-toolchain@nightly
98+ with :
99+ toolchain : ${{ env.TARGET_RUST_VERSION }}
100+ - uses : taiki-e/install-action@cargo-hack
101+ - uses : Swatinem/rust-cache@v2
102+ with :
103+ cache-on-failure : true
104+ - name : cargo hack
105+ run : cargo hack check
106+
107107 zk-cargo-test :
108- runs-on : ubuntu-22.04
109-
110- steps :
108+ runs-on : ubuntu-22.04
109+
110+ steps :
111111 - name : Checkout code
112112 uses : actions/checkout@v4
113113 with :
114114 submodules : recursive
115115 ref : ${{ github.event.pull_request.head.sha }}
116-
116+
117117 - name : Install Rust
118118 uses : actions-rust-lang/setup-rust-toolchain@v1
119119 with :
120120 toolchain : ${{ env.TARGET_RUST_VERSION }}
121121
122- - name : Install cargo-nextest
123- uses : taiki-e/install-action@nextest
122+ zk- cargo-test :
123+ runs-on : ubuntu-22.04
124124
125- - name : Run era-test-node
126- uses : dutterbutter/era-test-node-action@v1
127- with :
128- mode : fork
129- network : mainnet
130- log : info
131- logFilePath : era_test_node.log
132- target : x86_64-unknown-linux-gnu
133- releaseTag : v0.1.0-alpha.29
134- - name : Setup Git config
135- run : |
136- git config --global user.name "GitHub Actions Bot"
137- git config --global user.email "<>"
138- git config --global url."https://github.com/".insteadOf "[email protected] :" 139- - name : Run zk tests
140- env :
141- RUST_BACKTRACE : full
142- TEST_MAINNET_URL : http://localhost:8011
143- run : |
144- ZK_DEBUG_HISTORICAL_BLOCK_HASHES=5 cargo nextest run --package '*' --lib --test '*' --filter-expr 'test(~zk)'
125+ steps :
126+ - name : Checkout code
127+ uses : actions/checkout@v4
128+ with :
129+ submodules : recursive
130+ ref : ${{ github.event.pull_request.head.sha }}
145131
146- check-ci-install :
147- name : CI install
148- runs-on : ubuntu-22.04
149- steps :
150- - uses : actions/checkout@v4
151- - name : Install foundry-zksync
152- run : cp ./install-foundry-zksync ./foundryup-zksync/* /tmp/ && cd /tmp && ./install-foundry-zksync
153- - name : Verify installation
154- run : forge --version
132+ - name : Install Rust
133+ uses : actions-rust-lang/setup-rust-toolchain@v1
134+ with :
135+ toolchain : ${{ env.TARGET_RUST_VERSION }}
136+
137+ - name : Install cargo-nextest
138+ uses : taiki-e/install-action@nextest
139+
140+ - name : Run anvil-zksync
141+ uses :
dutterbutter/[email protected] 142+ with :
143+ mode : fork
144+ forkUrl : mainnet
145+ log : info
146+ logFilePath : anvil_zksync.log
147+ target : x86_64-unknown-linux-gnu
148+ releaseTag : v0.2.1
149+ - name : Setup Git config
150+ run : |
151+ git config --global user.name "GitHub Actions Bot"
152+ git config --global user.email "<>"
153+ git config --global url."https://github.com/".insteadOf "[email protected] :" 154+ - name : Run zk tests
155+ env :
156+ RUST_BACKTRACE : full
157+ TEST_MAINNET_URL : http://localhost:8011
158+ run : |
159+ ZK_DEBUG_HISTORICAL_BLOCK_HASHES=5 cargo nextest run --package '*' --lib --test '*' --filter-expr 'test(~zk)'
160+
161+ check-ci-install :
162+ name : CI install
163+ runs-on : ubuntu-22.04
164+ steps :
165+ - uses : actions/checkout@v4
166+ - name : Install foundry-zksync
167+ run : cp ./install-foundry-zksync ./foundryup-zksync/* /tmp/ && cd /tmp && ./install-foundry-zksync
168+ - name : Verify installation
169+ run : forge --version
0 commit comments