Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,17 @@ jobs:
run: npm run typecheck --if-present
- name: Build
run: npm run build
- name: Test (optional)
- name: Test with coverage
run: |
if npm run | grep -qE '^[[:space:]]+test'; then
npm test -- --watch=false
if npm run | grep -qE '^[[:space:]]+test:coverage'; then
mkdir -p coverage
npm run test:coverage
else
echo "No test script defined; skipping tests."
echo "No test:coverage script defined; skipping tests."
fi
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
fail_ci_if_error: false
22 changes: 22 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
coverage:
status:
project:
default:
target: 70%
threshold: 5%
patch:
default:
target: 60%
threshold: 10%

comment:
layout: "reach,diff,flags,tree"
behavior: default
require_changes: true

ignore:
- "src/vite-env.d.ts"
- "**/*.d.ts"
- "dist/**"
- "scripts/**/*.test.ts"
- "scripts/**/*.test.mjs"
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"format:check": "prettier --check src",
"prepare": "husky",
"test": "node --test --experimental-strip-types scripts/permissions/*.test.ts scripts/foundation/*.test.ts scripts/fleet-command/*.test.ts scripts/staffing-templates/*.test.mjs scripts/wiki-sync/*.test.mjs",
"test:coverage": "node --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test-reporter=spec --test-reporter-destination=stdout --test --experimental-strip-types scripts/permissions/*.test.ts scripts/foundation/*.test.ts scripts/fleet-command/*.test.ts scripts/staffing-templates/*.test.mjs scripts/wiki-sync/*.test.mjs",
"test:data": "node --test scripts/staffing-templates/*.test.mjs scripts/wiki-sync/*.test.mjs",
"staffing:generate-reviewed": "node scripts/staffing-templates/generate-reviewed-staffing-template-sql.mjs",
"db:load-generated": "bash scripts/supabase/load-generated-local-data.sh",
Expand Down
Loading