-
Notifications
You must be signed in to change notification settings - Fork 5
76 lines (64 loc) · 2.04 KB
/
test.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
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
72
73
74
75
76
name: test
on:
push:
branches:
- main
- dev
pull_request:
branches:
- dev
jobs:
run-tests:
name: Test contracts
runs-on: ubuntu-latest
# https://docs.github.com/en/actions/reference/authentication-in-a-workflow
permissions:
id-token: write
packages: read
contents: read
security-events: write
env:
SOLC_VERSION: 0.8.20
ETH_MAINNET_RPC_URL: ${{ secrets.ETH_MAINNET_RPC_URL }}
ETH_SEPOLIA_RPC_URL: ${{ secrets.ETH_SEPOLIA_RPC_URL }}
BASE_MAINNET_RPC_URL: ${{ secrets.BASE_MAINNET_RPC_URL }}
BASE_SEPOLIA_RPC_URL: ${{ secrets.BASE_SEPOLIA_RPC_URL }}
AURORA_MAINNET_RPC_URL: ${{ secrets.AURORA_MAINNET_RPC_URL}}
AURORA_TESTNET_RPC_URL: ${{ secrets.AURORA_TESTNET_RPC_URL}}
timeout-minutes: 15
container:
image: ghcr.io/nayms/contracts-builder:latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version: 20
cache: "yarn"
- name: Install solc
run: svm install 0.7.6 && svm install ${SOLC_VERSION} && svm use ${SOLC_VERSION}
- name: Fix ownership
run: git config --global --add safe.directory /__w/contracts-v3/contracts-v3
- name: Install Forge dependencies
run: forge install
- name: Install Node dependencies
run: yarn
- name: Build solidity contracts
run: make build
- name: Tests - local
run: make test
- name: Coverage report
run: make coverage
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: "./lcov-filtered.info"
- name: Slither Static Analyser
id: slither
run: make slither
- name: Upload Slither SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif