-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (44 loc) · 1.19 KB
/
commit.yml
File metadata and controls
54 lines (44 loc) · 1.19 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
name: Commit check (lint, tests)
on:
workflow_dispatch:
push:
pull_request:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Test and cover
run: npm run cover
- name: Report NYC coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
file: coverage/coverage-summary.json
debug: true
fail-on-error: false
- name: Report NYC coverage to pull request
uses: sidx1024/report-nyc-coverage-github-action@v1.2.7
with:
coverage_file: "coverage/coverage-summary.json"