This repository has been archived by the owner on Jun 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (51 loc) · 1.49 KB
/
build.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
name: build
on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
steps:
- name: checkout
uses: actions/checkout@v2
- name: node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: cache node modules
uses: actions/cache@v2
with:
# https://github.com/actions/cache/blob/main/examples.md#macos-and-ubuntu
# https://github.com/actions/cache/issues/67
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
- name: npm config
env:
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
run: |
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" "$FONTAWESOME_NPM_AUTH_TOKEN"
# https://docs.npmjs.com/cli/v6/commands/npm-ci
- name: npm ci
run: npm ci
- name: npm run lint
run: npm run lint
- name: npm run flow
run: npm run flow
- name: npm run test
run: npm run test
- name: npm run build:prod
run: npm run build:prod
- name: codecov
uses: codecov/codecov-action@v1