Skip to content

Commit 6ef3670

Browse files
committed
Add CI workflow to run tests on pull requests
- Run tests on PRs to main and pushes to main - Uses Node.js 20 with npm caching for faster runs - Builds project and runs vitest test suite Agent-Id: agent-197d346e-17e3-4016-8f9a-c7d77e060a1e
1 parent 46670d8 commit 6ef3670

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Build
27+
run: npm run build
28+
29+
- name: Run tests
30+
run: npm test

0 commit comments

Comments
 (0)