-
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (72 loc) · 1.9 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: ci
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
branches:
- '*'
tags-ignore:
- '*'
env:
CI_SKIP: false
jobs:
test:
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, 'doc:')"
name: ${{ matrix.os }} ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-18.04, windows-2019]
target: [13.x]
timeout-minutes: 120
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Git log
shell: bash
run: |
if [ -n "$(git log --format=%B -n 1 | grep -iE '^[0-9]+[.]{1,}[0-9]+[.]{1,}[0-9]+')" ]; then
echo '::set-env name=CI_SKIP::true'
fi
- name: Setup node@${{ matrix.target }}
if: "env.CI_SKIP == 'false'"
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.target }}
- name: List versions
if: "env.CI_SKIP == 'false'"
continue-on-error: true
shell: bash
run: |
node -v && npm version && which npm && pwd && npx envinfo
- name: Install dependencies
if: "env.CI_SKIP == 'false'"
run: |
npm ci --quiet
- name: Lint
if: "env.CI_SKIP == 'false'"
run: |
npm run lint
- name: Build
if: "env.CI_SKIP == 'false'"
run: |
npm run build
- name: Check build
if: "env.CI_SKIP == 'false'"
shell: bash
run: |
pwd && ls -la
- name: Run Test
if: "env.CI_SKIP == 'false'"
run: |
npm run jest
- name: Upload coverage to codecov
uses: codecov/codecov-action@v1
if: success()
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
flags: unit_tests