-
Notifications
You must be signed in to change notification settings - Fork 152
43 lines (36 loc) · 1.19 KB
/
test.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
name: Kitsu Test Suite
on: [push, pull_request]
jobs:
test:
name: Node ${{ matrix.node_version}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [16]
os: [ubuntu-latest]
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: Restore Cache
uses: actions/cache@v2
with:
path: |
node_modules
key: ${{ matrix.os }}-${{ matrix.node_version }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ matrix.os }}-${{ matrix.node_version }}-npm-
- name: Install Dependencies
run: npm ci
- name: Test App
run: COVERAGE=true npm run test:unit
- name: Report Test Coverage
if: github.event_name == 'push' && github.ref == 'refs/heads/react'
uses: paambaati/codeclimate-action@v2.7.4
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{ github.workspace }}/coverage/lcov.info:lcov