-
-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (48 loc) · 1.48 KB
/
Copy pathmake-coverage-html.yml
File metadata and controls
57 lines (48 loc) · 1.48 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
57
# yamllint disable rule:line-length
# This workflow runs make coverage/html and verifies that the coverage HTML report is generated.
# yamllint enable rule:line-length
---
name: Make Coverage HTML
env:
REPORT_DIR: "coverage/lcov-report"
REPORT_FILE: "index.html"
on: # yamllint disable-line rule:truthy
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
make-coverage-html:
name: "Run make coverage/html and verify coverage HTML"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- name: Set up Node.js
uses: actions/setup-node@v7
with:
node-version: 26.x
- name: Tool test
run: |
echo "Node.js version:"
node --version
echo "GNU make version:"
make --version
- name: Run coverage HTML target
run: make coverage/html
- name: Verify coverage HTML artifact
shell: bash
run: |
if [ ! -f $REPORT_DIR/$REPORT_FILE ]; then
echo "Coverage HTML file not found: $REPORT_DIR/$REPORT_FILE"
exit 1
fi
if [ ! -s $REPORT_DIR/$REPORT_FILE ]; then
echo "Coverage HTML file is empty: $REPORT_DIR/$REPORT_FILE"
exit 1
fi
- name: Upload coverage HTML artifact
uses: actions/upload-artifact@v7
with:
name: coverage-report-html
path: ${{ env.REPORT_DIR }}