-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (33 loc) · 945 Bytes
/
main.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
name: Tests
on:
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: true
- run: cat "${GITHUB_WORKSPACE}/.github/env.properties" >> $GITHUB_ENV
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version-file: ".nvmrc"
- name: Dependencies cache
uses: actions/cache@v2
id: npm-cache
with:
path: "./node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('./package-lock.json') }}
- name: Hardhat Cache
uses: actions/cache@v2
id: hardhat-cache
with:
path: "./cache"
key: ${{ runner.os }}-build-${{ hashFiles('./contracts/**') }}
- name: Run npm install
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm i
- name: Run npm test
run: npm t