-
Notifications
You must be signed in to change notification settings - Fork 15
69 lines (66 loc) · 1.79 KB
/
CI.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
name: Automated Tests and Linting
on:
push:
branches: [master]
pull_request:
branches:
- master
- dev
- v2
- v2.3
env:
CI: true
PARSER_BROKEN: false # set to true if Solidity parsing is currently broken, this will skip Linting and Coverage
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.13
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
- name: lint
run: yarn run lint
unit-test:
name: Unit Tests w/ Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: cache
with:
path: |
node_modules
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('yarn.lock') }}
- name: Install
run: yarn --frozen-lockfile
- name: Compile
run: yarn run compile
- name: Run tests
env:
MOCHA_REPORTER: dot
run: |
yarn run 'coverage'
- name: Unit Test Code Coverage Report
uses: romeovs/lcov-reporter-action@v0.3.1
with:
title: Unit Test Coverage Report
lcov-file: ./coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
delete-old-comments: true
if: ${{ github.event_name == 'pull_request' }}