-
Notifications
You must be signed in to change notification settings - Fork 16
71 lines (53 loc) · 1.79 KB
/
Copy pathcontracts.yml
File metadata and controls
71 lines (53 loc) · 1.79 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Contracts
on:
push:
branches: [main, staging, next]
pull_request:
workflow_dispatch:
jobs:
tests:
name: Contracts Tests
runs-on: macos-latest
env:
FOUNDRY_PROFILE: ci
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Install just
uses: extractions/setup-just@v3
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Show Foundry version
run: forge --version
- name: Show Soldeer version
run: forge soldeer version
- name: Install dependencies
run: just contracts-deps
- name: Install Bun
uses: oven-sh/setup-bun@v1
- name: Show Bun version
run: bun --version
working-directory: ./contracts
- name: Install Solhint
run: bun install solhint
working-directory: ./contracts
- name: Run Forge Lint
run: just contracts-lint
- name: Install Slither
run: pip install slither-analyzer
- name: Show Slither version
run: slither --version
- name: Run Slither Static Analyzer
run: just contracts-static-analysis
- name: Run Forge fmt
run: just contracts-fmt-check
- name: Check that bindings are up-to-date
run: just bindings-check
# The deployment promotion gate runs on pull requests into an environment branch, where the recorded
# deployments and the source are meant to agree. Elsewhere the gated tests skip and no chain is forked.
- name: Run Forge tests
run: just contracts-test
env:
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
VERIFY_STAGING_DEPLOYMENTS: ${{ github.base_ref == 'staging' }}
VERIFY_PRODUCTION_DEPLOYMENTS: ${{ github.base_ref == 'main' }}