Skip to content

Commit 37823c8

Browse files
ci: add CI workflow for tests and build verification
Co-Authored-By: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com>
1 parent 9ec7e45 commit 37823c8

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '18'
18+
cache: 'npm'
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Run tests
24+
run: npx jest --ci
25+
26+
- name: Build
27+
run: npm run build
28+
29+
- name: Check dist is up to date
30+
run: |
31+
git diff --exit-code dist/ || (echo "Error: dist/ is out of date. Run 'npm run build' and commit the result." && exit 1)

0 commit comments

Comments
 (0)