-
Notifications
You must be signed in to change notification settings - Fork 23
51 lines (51 loc) · 1.33 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
44
45
46
47
48
49
50
51
---
name: Run Tests
on:
- push
concurrency:
group: "tests"
cancel-in-progress: false
jobs:
lts-runtime:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['lts/-2', 'lts/-1']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: package-lock.json
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: npm run test
current-runtime:
runs-on: ubuntu-latest
needs: lts-runtime
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: npm
cache-dependency-path: package-lock.json
- name: Install Dependencies
run: npm ci
- name: Setup Code Climate
uses: remarkablemark/setup-codeclimate@v2
- name: Run Tests
run: |
cc-test-reporter before-build
npm run test-coverage
cc-test-reporter after-build --exit-code $?
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
- name: Send coverage to Coveralls
uses: coverallsapp/github-action@v2