Add GitHub Actions workflow for testing

This commit is contained in:
Mario Lurig
2025-12-10 21:37:43 -07:00
committed by GitHub
parent 33542867f8
commit 567fafbe8b
+35
View File
@@ -0,0 +1,35 @@
name: Tests
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
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: Upload coverage reports (optional)
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/
retention-days: 30