-
Notifications
You must be signed in to change notification settings - Fork 62
98 lines (87 loc) · 2.68 KB
/
checks.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Checks
on:
push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CACHE_KEY: ${{ vars.CACHE_KEY }} # Change to bust caches
# https://github.com/NomicFoundation/hardhat/issues/3877
NODE_VERSION: '18.15'
NODE_OPTIONS: ${{ vars.NODE_OPTIONS }}
ENABLE_OPTIMIZER: ${{ vars.ENABLE_OPTIMIZER }}
jobs:
setup:
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: package-lock.json
- uses: actions/cache@v3
id: cache
with:
path: node_modules
key: node-modules-cache-node-${{ env.NODE_VERSION }}-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
lint:
runs-on: ubuntu-22.04
timeout-minutes: 5
needs: setup
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: package-lock.json
- uses: actions/cache@v3
id: cache
with:
path: node_modules
key: node-modules-cache-node-${{ env.NODE_VERSION }}-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Lint
run: npm run lint
test:
runs-on: ubuntu-22.04
timeout-minutes: 20
needs: setup
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: package-lock.json
- uses: actions/cache@v3
id: cache
with:
path: node_modules
key: node-modules-cache-node-${{ env.NODE_VERSION }}-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Test
run: npm test
coverage:
runs-on: ubuntu-22.04
timeout-minutes: 20
needs: setup
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: package-lock.json
- uses: actions/cache@v3
id: cache
with:
path: node_modules
key: node-modules-cache-node-${{ env.NODE_VERSION }}-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Coverage
run: npm run coverage && cat coverage/lcov.info | npx coveralls