Skip to content

Commit f6767d3

Browse files
authored
Added coverage, test-results to release (#379)
* Added coverage, test-results to release * Added Security condifgs and compilation optimization
1 parent 7e9f177 commit f6767d3

File tree

6 files changed

+600
-723
lines changed

6 files changed

+600
-723
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ jobs:
105105
git commit -m "Update CHANGELOG.md after release [skip ci]"
106106
git push
107107
108+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
109+
with:
110+
name: test-coverage
111+
path: ./coverage
112+
113+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
114+
with:
115+
name: test-report
116+
path: ./test-report.html
117+
108118
- name: Publish coverage report to QLTY
109119
if: github.repository_owner == 'Open-CMSIS-Pack'
110120
uses: qltysh/qlty-action/coverage@f13b3559771beedd11e68b03d49512f3c21a75ba # v1
@@ -188,7 +198,21 @@ jobs:
188198
with:
189199
pattern: vsix-package-*
190200

201+
- name: Download coverage report
202+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
203+
with:
204+
pattern: test-coverage
205+
206+
- name: Download test report
207+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
208+
with:
209+
pattern: test-report
210+
191211
- name: Attach packages
192212
uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
193213
with:
194-
files: "**/*.vsix"
214+
files: |
215+
**/*.vsix
216+
test-report.html
217+
coverage/*
218+

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ test-workspace/*
66
!test-workspace/.vscode
77
tools
88
coverage
9-
site/*
9+
site/*
10+
test-report.html

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"build": "webpack --mode production && yarn lint",
9292
"watch": "webpack -w",
9393
"lint": "eslint .",
94-
"test": "jest",
94+
"test": "jest --reporters=./node_modules/jest-html-reporter",
9595
"package": "vsce package --yarn",
9696
"tpip:report": "ts-node scripts/tpip-reporter --header docs/tpip-header.md docs/third-party-licenses.json TPIP.md",
9797
"lint:md": "markdownlint **/*.md -c ./.github/markdownlint.jsonc -i ./node_modules ./dist ./coverage ./tools",
@@ -120,6 +120,7 @@
120120
"extract-zip": "^2.0.1",
121121
"globby": "^14.1.0",
122122
"jest": "^30.0.4",
123+
"jest-html-reporter": "^4.3.0",
123124
"markdown-link-check": "^3.13.7",
124125
"markdownlint-cli": "^0.45.0",
125126
"node-fetch": "^3.3.2",

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import * as path from 'path';
2020

2121
export const isWindows = os.platform() === 'win32';
2222

23-
export const getCmsisPackRootPath = (): string|undefined => {
23+
export const getCmsisPackRootPath = (): string => {
2424
const environmentValue = process.env['CMSIS_PACK_ROOT'];
2525
if (environmentValue) {
2626
return environmentValue;

tsconfig.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
{
22
"compilerOptions": {
3-
"target": "ESNext",
3+
"target": "ES2024",
44
"module": "commonjs",
55
"strict": true,
66
"declaration": false,
77
"outDir": "dist",
88
"esModuleInterop": true,
9+
"isolatedModules": true,
10+
"noUnusedLocals": true,
11+
"noUnusedParameters": true,
12+
"noImplicitReturns": true,
913
"skipLibCheck": true,
1014
"sourceMap": true,
11-
"lib": [
12-
"ESNext"
13-
]
15+
"noImplicitAny": true,
16+
"noFallthroughCasesInSwitch": true,
17+
"exactOptionalPropertyTypes": true,
1418
},
1519
"include": [
1620
"src"

0 commit comments

Comments
 (0)