Skip to content

Commit 74f0c8f

Browse files
authored
Add ci (#1)
1 parent 05200e5 commit 74f0c8f

3 files changed

Lines changed: 46 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
name: Test and Lint
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
17+
18+
- name: Setup Bun
19+
uses: oven-sh/setup-bun@b7a1c7ccf290d58743029c4f6903da283811b979 # v2.1.0
20+
with:
21+
bun-version: latest
22+
23+
- name: Install dependencies
24+
run: bun install --frozen-lockfile
25+
26+
- name: Lint code
27+
run: bun run lint
28+
29+
- name: Build userscript (test)
30+
run: bun run build:userscript
31+
32+
- name: Build apps (test)
33+
run: bun run build:apps

biome.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.3.10/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",
@@ -20,6 +20,15 @@
2020
"recommended": true,
2121
"style": {
2222
"noNonNullAssertion": "warn"
23+
},
24+
"correctness": {
25+
"useExhaustiveDependencies": "warn"
26+
},
27+
"suspicious": {
28+
"noArrayIndexKey": "warn"
29+
},
30+
"security": {
31+
"noDangerouslySetInnerHtml": "warn"
2332
}
2433
}
2534
},

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
},
1313
"scripts": {
1414
"lint": "biome lint",
15-
"format": "biome format --write"
15+
"format": "biome format --write",
16+
"build:userscript": "bun run -F './packages/colorproven-userscript' build",
17+
"build:apps": "bun run -F './apps/*' build"
1618
},
1719
"devDependencies": {
1820
"@biomejs/biome": "2.3.11",

0 commit comments

Comments
 (0)