-
Notifications
You must be signed in to change notification settings - Fork 15
65 lines (55 loc) · 1.45 KB
/
build.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
58
59
60
61
62
63
64
65
name: build
on:
pull_request:
branches:
- main
paths:
- '**.js'
- '**.json'
- '**.yml'
push:
branches:
- main
paths:
- '**.js'
- '**.json'
- '**.yml'
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
statuses: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: actions/cache@v4
id: cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- # if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- run: npm test
- run: npm run lint
- id: coverage-monitor-clover
uses: ./
name: "Run slavcodev/coverage-monitor-action@v1#coverage-monitor-clover"
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
coverage_path: ".coverage/clover.xml"
comment_context: "Coverage from clover"
- id: coverage-monitor-json
uses: ./
name: "Run slavcodev/coverage-monitor-action@v1#coverage-monitor-json"
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
coverage_path: ".coverage/coverage-summary.json"
comment_context: "Coverage from json-summary"
check: false