Skip to content

Commit 2f144d6

Browse files
authored
Enable GitHub Actions (#1)
1 parent 1c2b776 commit 2f144d6

File tree

4 files changed

+84
-0
lines changed

4 files changed

+84
-0
lines changed

.github/dependabot.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: github-actions
5+
directory: '/'
6+
schedule:
7+
interval: 'weekly'
8+
9+
- package-ecosystem: npm
10+
directory: '/'
11+
schedule:
12+
interval: 'weekly'
13+
versioning-strategy: 'increase-if-necessary'

.github/workflows/test.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
test:
16+
name: node@${{ matrix.node-version }}
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
node-version:
22+
- 24
23+
- latest
24+
steps:
25+
- uses: actions/checkout@v6
26+
- uses: actions/setup-node@v6
27+
with:
28+
node-version: ${{ matrix.node-version }}
29+
- uses: pnpm/action-setup@v4
30+
- run: pnpm install
31+
- run: pnpm test
32+
- run: pnpm typecheck

.github/workflows/verify.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Verify
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
format:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v6
19+
- uses: actions/setup-node@v6
20+
with:
21+
node-version: 24
22+
- uses: pnpm/action-setup@v4
23+
- run: pnpm install
24+
- run: pnpm format:ci
25+
26+
lint:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v6
30+
- uses: actions/setup-node@v6
31+
with:
32+
node-version: 24
33+
- uses: pnpm/action-setup@v4
34+
- run: pnpm install
35+
- run: pnpm lint:ci

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"engines": {
3131
"node": ">=24"
3232
},
33+
"packageManager": "pnpm@10.27.0",
3334
"dependencies": {
3435
"@prettier/plugin-oxc": "^0.1.3",
3536
"klona": "^2.0.6",
@@ -50,7 +51,10 @@
5051
},
5152
"scripts": {
5253
"format": "prettier --write --ignore-unknown .",
54+
"format:ci": "prettier --check --ignore-unknown .",
5355
"lint": "oxlint --fix --type-aware --type-check --deny-warnings --report-unused-disable-directives",
56+
"lint:ci": "oxlint --type-aware --type-check --deny-warnings --report-unused-disable-directives",
57+
"prepack": "pnpm run '/^(format:ci|lint:ci|test|typecheck)$/'",
5458
"test": "vitest run",
5559
"typecheck": "tsc --noEmit"
5660
}

0 commit comments

Comments
 (0)