Skip to content

Commit ca68b1b

Browse files
committed
👷 add ci for dry run and compile
1 parent 921cbed commit ca68b1b

File tree

3 files changed

+40
-9
lines changed

3 files changed

+40
-9
lines changed

.github/workflows/docker.yml

-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
name: Docker
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
- main
8-
9-
pull_request:
10-
branches:
11-
- master
12-
- main
134

145
workflow_dispatch:
156
inputs:

.github/workflows/test.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test
2+
3+
on:
4+
5+
push:
6+
pull_request:
7+
8+
9+
jobs:
10+
dry-run:
11+
name: Dry Run
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- uses: oven-sh/setup-bun@v2
18+
19+
- name: Install dependencies
20+
run: bun install
21+
22+
- name: Test dry run
23+
run: |
24+
timeout 5s bun run start || if [ $? -eq 124 ]; then exit 0; else exit 1; fi
25+
26+
compile:
27+
name: Compile
28+
runs-on: ubuntu-latest
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- uses: oven-sh/setup-bun@v2
34+
35+
- name: Install dependencies
36+
run: bun install
37+
38+
- name: Test Compile
39+
run: bun run build

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "",
55
"main": "index.ts",
66
"scripts": {
7+
"start": "bun run index.ts",
78
"build": "bun build index.ts --compile --minify --bytecode --outfile dist/server",
89
"build:dev": "bun build index.ts --compile --sourcemap --outfile dist/server"
910
},

0 commit comments

Comments
 (0)