-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.2 KB
/
ci.yml
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
name: Continuous Integration
on:
push: # run on every push
branches: [ main ]
pull_request: # run on every pull request
jobs:
build-n-test: # building smart contract, running lint and tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: yarn install
- name: Compile smart contract
run: yarn compile
- name: Run linting checks
run: yarn lint
- name: Run tests
run: yarn test
code-analysis: # static code analysis
runs-on: ubuntu-latest
permissions:
# required for uploading slither sarif results
security-events: write
steps:
- uses: actions/checkout@v4
- name: Run static analysis with slither
uses: crytic/slither-action@v0.3.1
id: slither
continue-on-error: true
with:
sarif: results.sarif
slither-args: --filter-paths node_modules # exclude other contracts (open zeppelin ones)
- name: Upload static anaylisis SARIF output file # it should also add relevant comments on PR
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.slither.outputs.sarif }}