1
0
Fork 0
mirror of https://github.com/imjasonh/govulncheck-action synced 2026-07-11 01:53:12 +00:00

Add CI workflow for tests and dist verification

This workflow ensures:
- All tests pass on PRs and main branch pushes
- Test coverage is generated
- The dist/ directory is up to date with source code

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Jason Hall 2025-06-07 01:11:35 -04:00
parent 1c60665312
commit 685550bfdb
Failed to extract signature

53
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,53 @@
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Check test coverage
run: npm run coverage
dist-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build dist
run: npm run build
- name: Check if dist is up to date
run: |
if [ -n "$(git status --porcelain dist/)" ]; then
echo "::error::dist/ is not up to date. Please run 'npm run build' and commit the changes."
git diff dist/
exit 1
fi