Skip to content

Commit 57d742d

Browse files
michaeloboyleclaude
andcommitted
ci: Add GitHub Actions workflow for automated testing
- Run tests on push and pull requests - Test on Node.js 18, 20, and 22 - Run linter and build checks - Upload coverage to Codecov - Ensures code quality on every commit 🤖 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
1 parent 42b6faf commit 57d742d

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x, 22.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Run linter
30+
run: npm run lint --if-present
31+
32+
- name: Build
33+
run: npm run build
34+
35+
- name: Run tests
36+
run: npm test
37+
38+
- name: Check test coverage
39+
run: npm run test:coverage
40+
41+
- name: Upload coverage to Codecov
42+
if: matrix.node-version == '20.x'
43+
uses: codecov/codecov-action@v3
44+
with:
45+
files: ./coverage/lcov.info
46+
fail_ci_if_error: false

0 commit comments

Comments
 (0)