-
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (49 loc) · 1.64 KB
/
test.yaml
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
name: Test
on:
push:
branches:
- main
pull_request:
jobs:
coverageRun:
name: Run Coverage
runs-on: ubuntu-latest
if: "!(contains(github.event.head_commit.message, '[skip test]') || contains(github.event.head_commit.message, '[skip coverage run]'))"
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Install NodeJS v12
uses: actions/setup-node@v1
with:
node-version: 12
- name: Restore CI Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-12-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn --ignore-scripts --frozen-lockfile
- name: Run Coverage tests
run: "yarn run test:coverage"
- name: Store code coverage report
uses: actions/upload-artifact@v2-preview
with:
name: coverage
path: coverage/
coverageUploadCoveralls:
name: Upload Coverage results to Coveralls
needs: coverageRun
runs-on: ubuntu-latest
if: "!(contains(github.event.head_commit.message, '[skip test]') || contains(github.event.head_commit.message, '[skip coverage upload]') || contains(github.event.head_commit.message, '[skip coverage upload coveralls]'))"
steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Download Coverage report
uses: actions/download-artifact@v2-preview
with:
name: coverage
path: coverage/
- name: Coveralls Upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}