-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (54 loc) · 1.69 KB
/
ethereum.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
name: Ethereum
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
buildandtestandcoverageandanalyzer:
name: build, test, coverage and analyzer
defaults:
run:
working-directory: ethereum/kycdao-ntnft
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: ethereum/kycdao-ntnft/package-lock.json
- name: Install dependencies
run: npm ci
- name: Compile
run: npm run compile
- name: Run tests
run: npm test
# These GSN tests are failing on the CI, commenting till fixed
# - name: Run GSN tests
# run: npm run testGsn
- name: Generate solidity coverage reports
run: node --max-old-space-size=4096 ./node_modules/.bin/hardhat coverage
- name: Upload reports to codecov
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
find . -iregex "codecov.*"
chmod +x codecov
./codecov -t ${CODECOV_TOKEN}
- name: Slither analyze code
run: |
pip3 install slither-analyzer
slither --no-fail-pedantic --disable-color --sarif results.sarif .
slither --no-fail-pedantic --disable-color --ignore-compile --print human-summary .
- name: Upload sarif results
uses: actions/upload-artifact@v3
with:
name: results.sarif
path: ethereum/kycdao-ntnft/results.sarif
retention-days: 90