-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.25 KB
/
coverage.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
name: coverage
on: [push]
jobs:
coverage:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
CODECLIMATE_PREBUILD_TEST_REPORTER_URL: https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get Yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --prefer-offline --frozen-lockfile
- run: yarn test:coverage
- name: set up codeclimate test reporter
run: |
wget -O cc-test-reporter ${CODECLIMATE_PREBUILD_TEST_REPORTER_URL}
chmod u+x cc-test-reporter
- name: coverage
run: |
./cc-test-reporter before-build
yarn test:coverage
./cc-test-reporter after-build