-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.13 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
name: test
run-name: Running tests for ${{ github.ref }}
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_call:
secrets:
CC_TEST_REPORTER_ID:
description: "Code Climate Test Reporter ID to publish test results to Code Climate."
required: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ./.nvmrc
cache: npm
- name: Install NPM Packages
run: npm ci
- name: Generate Test Data
run: npm run test:generate-data
- name: Run Tests & Publish Coverage to Code Climate
uses: paambaati/codeclimate-action@v8
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
if: ${{ env.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm run test:cov