-
Notifications
You must be signed in to change notification settings - Fork 189
56 lines (47 loc) · 1.61 KB
/
test.yml
File metadata and controls
56 lines (47 loc) · 1.61 KB
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
53
54
55
56
name: Tests
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
tests:
name: Run unit tests
runs-on: ubuntu-latest
permissions:
checks: write
contents: read
steps:
- name: "build: checkout the latest changes"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: "build: setup the node runtime"
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
cache: npm
cache-dependency-path: package-lock.json
node-version-file: .nvmrc
- name: "build: install the required dependencies"
run: npm ci
- name: "unit(test): perform lints and formatting checks"
run: npm run lint
- name: "unit(test): perform check of typings"
run: npm run check
- name: "unit(test): perform unit test checks"
run: npm test
- name: "unit(test): upload coverage to CodeCov"
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
with:
files: test/coverage.txt
token: ${{ secrets.CODECOV_TOKEN }}
- name: "build: package code for distribution"
run: npm run build
- name: "chore(health): check up on recent changes to the health score"
uses: slackapi/slack-health-score@d58a419f15cdaff97e9aa7f09f95772830ab66f7 # v0.1.1
with:
codecov_token: ${{ secrets.CODECOV_API_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
extension: js
include: src