forked from berty/berty
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (65 loc) · 1.53 KB
/
js.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: JS
on:
push:
tags:
- v*
branches:
- master
paths:
- "js/**"
- "config/**"
- "tool/generate-i18n-testlang"
- ".github/workflows/js.yml"
pull_request:
paths:
- "js/**"
- "config/**"
- "tool/generate-i18n-testlang"
- ".github/workflows/js.yml"
jobs:
build-and-lint:
runs-on: ubuntu-latest
strategy:
matrix:
node:
#- 10.x
#- 12.x
- 14.x
steps:
- uses: actions/[email protected]
- name: Use Node.js ${{ matrix.node }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
- name: Cache Node.js modules
uses: actions/[email protected]
with:
path: js/node_modules
key: ${{ runner.OS }}-node-${{ matrix.node }}-v2-${{ hashFiles('js/yarn.lock') }}
restore-keys: ${{ runner.OS }}-node-${{ matrix.node }}-v2-
- name: "Fetch deps"
run: |
cd js
make node_modules
env:
CI: true
- name: "Run tests"
run: |
cd js
make test
env:
CI: true
- name: "Run lint"
run: |
cd js
make lint
env:
CI: true
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
file: ./js/coverage/coverage-final.json
flags: js.unittests
env_vars: OS,NODE_VERSION
name: codecov-umbrella
fail_ci_if_error: false