-
Notifications
You must be signed in to change notification settings - Fork 38
49 lines (45 loc) · 1.26 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
name: CI
on:
pull_request:
push:
branches:
- develop
- master
- 'release/*'
- 'hotfix/*'
env:
CI: true
jobs:
fetch-dependencies:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- name: fetch and cache npm dependencies
id: cache-node-modules
uses: actions/cache@v2
with:
path: ./node_modules
key: cached_node_modules_${{ hashFiles('**/yarn.lock') }}
restore-keys: cached_node_modules_
- if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn --prefer-offline --frozen-lockfile --ignore-engines
test-with-coverage:
runs-on: ubuntu-latest
needs: fetch-dependencies
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- id: cache-node-modules
uses: actions/cache@v2
with:
path: ./node_modules
key: cached_node_modules_${{ hashFiles('**/yarn.lock') }}
restore-keys: cached_node_modules_
- run: yarn test:cover
- name: Send coverage report to coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}