-
Notifications
You must be signed in to change notification settings - Fork 21
56 lines (53 loc) · 1.46 KB
/
l2_contracts.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: L2 Contracts CI
on:
push:
branches: ["main"]
paths:
- "crates/l2/contracts/**"
pull_request:
branches: ["**"]
paths:
- "crates/l2/contracts/**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
deployer:
name: L2 Contracts CI
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
action:
- command: check
- command: clippy
# clippy::large_enum_variant warning for the EvmState enum
# from rust 1.82.0
args: -- -D warnings -A clippy::large_enum_variant
- command: fmt
args: --all -- --check
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Add Rust Cache
uses: Swatinem/rust-cache@v2
- name: ${{ matrix.action.command }} Command
run: |
cd crates/l2/contracts
cargo ${{ matrix.action.command }} ${{ matrix.action.args }}
test_compilation:
name: Compile Contracts
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Rust toolchain install
uses: dtolnay/rust-toolchain@stable
- name: Install solc
uses: pontem-network/get-solc@master
- name: Caching
uses: Swatinem/rust-cache@v2
- name: Run test of deployer.rs
run: |
cd crates/l2/contracts
cargo test