-
Notifications
You must be signed in to change notification settings - Fork 7
62 lines (54 loc) · 1.54 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
58
59
60
61
62
# This workflow runs the tests across Linux, Mac, Windows
name: KX VS Code CI Testing
on:
pull_request:
branches:
- dev
- main
paths-ignore: ["**/*.md"]
jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npm ci
- run: xvfb-run -a npm run coverage
if: runner.os == 'Linux'
- run: npm test
if: runner.os != 'Linux'
- name: Code coverage summary
if: runner.os == 'Linux'
uses: irongut/[email protected]
with:
filename: ./coverage-reports/cobertura-coverage.xml
badge: true
format: markdown
hide_branch_rate: true
hide_complexity: true
thresholds: "30 80"
output: "both"
- name: Write Coverage to Job Summary
if: runner.os == 'Linux'
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
- name: Upload lcov result for app-sec job
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: lcov
path: coverage-reports/lcov.info
retention-days: 1
app-sec:
needs: test
if: "! github.event.pull_request.head.repo.fork "
uses: ./.github/workflows/app-sec-template.yml
with:
github_ref: ${{ github.ref_name }}
secrets: inherit