-
Notifications
You must be signed in to change notification settings - Fork 13
49 lines (42 loc) · 1.04 KB
/
run-linter-and-tests.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
name: run linter and tests
on:
push:
branches-ignore:
- master
- develop
paths:
- '**.ts'
- '**.sol'
- '**.yml'
- '**.json'
jobs:
start:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node.js
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Determine npm cache directory
id: npm-cache
run: echo "::set-output name=dir::$(npm config get cache)"
- name: Restore npm cache
uses: actions/cache@v2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: |
npm i
env:
CI: true
- name: Run linter
run: npm run lint
- name: Run tests
run: npm run test -- --report-gas
- name: Dry run build
run: npm run build