Skip to content

Local Dev Reference

Quick reference for coverage reports, CI simulation with act, and per-workflow local equivalents. Not a skill — won't auto-load into context.


Coverage reports

bash
npm run test:coverage    # Vitest + pytest, generates both HTML reports
npm run coverage:open    # opens coverage/index.html + test-results/htmlcov/index.html

Individual suites:

bash
npm run test:unit:coverage    # → coverage/index.html
python -m pytest tests/test_api_endpoints.py tests/test_cv_download.py tests/test_cv_generation.py tests/test_cv_files_exist.py \
  --cov=api --cov-report=html:test-results/htmlcov

CI simulation with act

ACT=/c/Users/srely/AppData/Local/Microsoft/WinGet/Packages/nektos.act_Microsoft.Winget.Source_8wekyb3d8bbwe/act.exe

One-time config: echo "-P ubuntu-latest=catthehacker/ubuntu:act-latest" > /c/Users/srely/AppData/Local/act/actrc

Run individual jobs:

bash
$ACT -j api      -W .github/workflows/test.yml --container-architecture linux/amd64 --artifact-server-path ./act-artifacts
$ACT -j unit     -W .github/workflows/test.yml --container-architecture linux/amd64 --artifact-server-path ./act-artifacts
$ACT -j typecheck -W .github/workflows/test.yml --container-architecture linux/amd64
$ACT -j links    -W .github/workflows/test.yml --container-architecture linux/amd64
$ACT -j lint     -W .github/workflows/validate-infrastructure.yml --container-architecture linux/amd64

Extract artifacts: find act-artifacts -name "*.zip" | while read z; do unzip -o "$z" -d test-results/ 2>/dev/null || true; done

Known Windows ARM64 limitations (non-blocking): dorny/test-reporter fails (no GitHub API), upload-artifact panics under QEMU, vite:esbuild crashes under QEMU — run npm run test:unit locally instead.


Per-workflow local equivalents

Workflow Offline with act? Local equivalent
test.yml ✅ (caveats above) npm run test:unit + pytest tests/
validate-infrastructure.yml az bicep build --file infra/main.bicep
cost-report.yml ✅ with Azure creds python scripts/generate_cost_report.py
generate-cv.yml npm run cv:generate && npm run cv:publish
deploy-application.yml ❌ needs ACR docker-compose build --no-cache
deploy-docs.yml ❌ needs SWA token docker-compose up docs
smoke-test-prod.yml ❌ needs prod URL BASE_URL=http://localhost npx playwright test
deploy-infrastructure*.yml ❌ needs Azure OIDC az deployment sub what-if

Secrets file (gitignored): create .secrets with EMAIL_ADDRESS, EMAIL_PASSWORD, or Azure OIDC vars as needed.