File tree Expand file tree Collapse file tree 4 files changed +16
-8
lines changed Expand file tree Collapse file tree 4 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 5
5
6
6
# Node.js
7
7
node_modules
8
- bun.lock
8
+ # We don't exclude bun.lock* as it's needed for the build
9
9
npm-debug.log
10
10
yarn-debug.log
11
11
yarn-error.log
Original file line number Diff line number Diff line change 16
16
build-and-test :
17
17
name : Build and Test Astro Project
18
18
runs-on : ubuntu-latest
19
-
19
+
20
20
steps :
21
21
- name : Checkout repository
22
22
uses : actions/checkout@v4
@@ -25,10 +25,17 @@ jobs:
25
25
uses : oven-sh/setup-bun@v1
26
26
with :
27
27
bun-version : ' 1.2.9'
28
- cache : true
29
28
30
- - name : Install dependencies
31
- run : bun install
29
+ - name : Check lockfile and install dependencies
30
+ run : |
31
+ # Check if bun.lock exists, if not check for bun.lockb
32
+ if [ -f "bun.lock" ]; then
33
+ echo "Using existing bun.lock file"
34
+ elif [ -f "bun.lockb" ]; then
35
+ echo "Found bun.lockb, creating symlink to bun.lock"
36
+ ln -s bun.lockb bun.lock
37
+ fi
38
+ bun install
32
39
33
40
- name : Run tests
34
41
run : bunx vitest run
Original file line number Diff line number Diff line change 7
7
- ' Dockerfile'
8
8
- ' .dockerignore'
9
9
- ' package.json'
10
- - ' bun.lock'
10
+ - ' bun.lock* '
11
11
pull_request :
12
12
branches : [ main ]
13
13
paths :
14
14
- ' Dockerfile'
15
15
- ' .dockerignore'
16
16
- ' package.json'
17
- - ' bun.lock'
17
+ - ' bun.lock* '
18
18
schedule :
19
19
- cron : ' 0 0 * * 0' # Run weekly on Sunday at midnight
20
20
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ RUN apk add --no-cache libc6-compat python3 make g++ gcc wget sqlite
6
6
7
7
# ----------------------------
8
8
FROM base AS deps
9
- COPY package.json bun.lock ./
9
+ COPY package.json ./
10
+ COPY bun.lock* ./
10
11
RUN bun install --frozen-lockfile
11
12
12
13
# ----------------------------
You can’t perform that action at this time.
0 commit comments