Skip to content

Commit c04088f

Browse files
committed
ci: add test workflow running on push to any branch
1 parent 3fcb3b7 commit c04088f

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Describe the change and why it’s needed.
1313
- Manual:
1414
- [ ] `statikapi build` basic
1515
- [ ] `statikapi build` dynamic routes
16-
- [ ] `statikapi preview` UI opens and lists routes
16+
- [ ] `statikapi dev` UI opens and lists routes
1717

1818
## Notes
1919

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI (tests)
2+
3+
on:
4+
push:
5+
branches: ['**'] # run on push to any branch
6+
7+
permissions:
8+
contents: read
9+
10+
# Cancel in-progress runs for the same branch to save minutes
11+
concurrency:
12+
group: ci-tests-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Use Node 22
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
cache: 'pnpm' # built-in cache for pnpm store
30+
31+
- name: Setup pnpm
32+
uses: pnpm/action-setup@v4
33+
with:
34+
version: 9
35+
36+
- name: Install deps
37+
run: pnpm install --frozen-lockfile
38+
env:
39+
CI: true
40+
41+
- name: Run tests
42+
run: pnpm -r test -- --ci
43+
env:
44+
CI: true

0 commit comments

Comments
 (0)