-
Notifications
You must be signed in to change notification settings - Fork 5
66 lines (54 loc) · 1.61 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
name: CI
on:
pull_request:
push:
branches:
- master
- release
jobs:
build-and-test:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
name: Build & Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 12.x, 14.x, 16.x ]
steps:
- name: Checkout
uses: actions/checkout@master
with:
ref: ${{ github.head_ref }}
- name: Get Yarn Cache Directory Path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use NodeJS ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Yarn Init
id: yarn-cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Lint Commit Message
run: |
yarn add -D -W @commitlint/config-conventional
echo $(git log -1 --pretty=format:"%s") | yarn commitlint
- name: Lint
run: lerna exec --parallel -- yarn lint
- name: Build
run: yarn build
- name: Test
run: yarn test:cov
- name: Upload Report to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage
fail_ci_if_error: false
files: ./coverage/cobertura-coverage.xml
name: codecov-umbrella
verbose: false