chore(packages): add test coverage support to plugin sdk and shared package

This commit is contained in:
jubnl
2026-08-25 01:22:20 +02:00
parent 190dc482e4
commit 4548743874
10 changed files with 545 additions and 265 deletions
+44 -1
View File
@@ -78,7 +78,50 @@ jobs:
run: cd shared && npm run typecheck
- name: Run tests
run: cd shared && npm test
run: cd shared && npm run test:coverage
- name: Upload coverage
if: success()
uses: actions/upload-artifact@v6
with:
name: shared-coverage
path: shared/coverage/
retention-days: 7
plugin-sdk-tests:
name: Plugin SDK Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: plugin-sdk
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
# 22 matches the TREK server runtime and has node:sqlite, which the
# dev-server tests exercise (same choice as publish-plugin-sdk.yml).
node-version: 22
# plugin-sdk is standalone (own lockfile, not a root workspace), so it
# installs from its own directory.
- name: Install dependencies
run: npm ci
- name: Typecheck
run: npm run typecheck
- name: Run tests
run: npm run test:coverage
- name: Upload coverage
if: success()
uses: actions/upload-artifact@v6
with:
name: plugin-sdk-coverage
path: plugin-sdk/coverage/
retention-days: 7
server-tests:
name: Server Tests