Skip to content

Commit e378228

Browse files
ci: build and test on every PR to main
Runs npm ci, a production build, and the Karma/Jasmine suite (headless Chrome) on every pull request. Gives PRs (Dependabot's included) a pass/fail signal before merge instead of only finding out a bump broke the build after it's on main.
1 parent a37d9db commit e378228

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: ci-${{ github.event.pull_request.number }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build-and-test:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '24'
26+
cache: npm
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Build (production)
32+
run: npm run build -- --configuration production
33+
34+
- name: Run unit tests
35+
run: npm test -- --no-watch --no-progress --browsers=ChromeHeadless

0 commit comments

Comments
 (0)