-
Notifications
You must be signed in to change notification settings - Fork 10
57 lines (52 loc) · 1.9 KB
/
main.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
52
53
54
55
56
57
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on: [push, pull_request]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
node_version:
- 16
- 18
- 20
name: Node ${{ matrix.node_version }} on ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup node environment
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
- run: npm install
- run: npm test
# - name: Lint
# run: npm run lint
# - name: Upload checkstyle report
# uses: jwgmeligmeyling/checkstyle-github-action@master
# with:
# path: '**/checkstyle-result.xml'
- name: Coverage
run: npm run coverage
# Required for generating html artifact, can be skipped if not generating html artifact
# - name: Report coverage
# uses: hrishikesh-kadam/setup-lcov@v1
# - name: Upload coverage report
# uses: kefasjw/lcov-pull-request-report@v1
# with:
# # Lcov file location. For example, coverage/lcov.info
# lcov-file: coverage/lcov.info
# # Github token required for getting list of changed files and posting comments
# github-token: ${{ secrets.GITHUB_TOKEN }}
# ... Generate LCOV files or download it from a different job
# - name: Setup LCOV
# uses: hrishikesh-kadam/setup-lcov@v1
# - name: Report coverage
# uses: zgosalvez/github-actions-report-lcov@v4
# with:
# coverage-files: coverage/lcov.info
# github-token: ${{ secrets.ACTIONS_TOKEN }}
# update-comment: true