Skip to content

Commit 9ef8615

Browse files
committed
feat: caching in ci
1 parent 000ef1a commit 9ef8615

File tree

1 file changed

+38
-5
lines changed

1 file changed

+38
-5
lines changed

.github/workflows/test.yml

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,26 @@ jobs:
5858
with:
5959
bun-version: latest
6060

61+
- name: Cache Bun dependencies
62+
uses: actions/cache@v4
63+
with:
64+
path: |
65+
~/.bun/install/cache
66+
node_modules
67+
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
68+
restore-keys: |
69+
${{ runner.os }}-bun-
70+
71+
- name: Cache Turbo
72+
uses: actions/cache@v4
73+
with:
74+
path: .turbo
75+
key: ${{ runner.os }}-turbo-${{ hashFiles('**/turbo.json', '**/package.json') }}
76+
restore-keys: |
77+
${{ runner.os }}-turbo-
78+
6179
- name: Install dependencies
62-
run: bun install --frozen-lockfile
80+
run: bun install
6381

6482
- name: Run tests
6583
env:
@@ -81,11 +99,26 @@ jobs:
8199
# Test environment
82100
NODE_ENV: test
83101

84-
# Auth secrets (use dummy values for tests)
85-
AUTH_SECRET: test-auth-secret-for-ci-testing-only
86-
NEXTAUTH_SECRET: test-auth-secret-for-ci-testing-only
102+
# Better Auth secrets (use dummy values for tests)
103+
BETTER_AUTH_SECRET: test-auth-secret-for-ci-testing-only
104+
BETTER_AUTH_URL: http://localhost:3000
105+
106+
# OAuth providers (use dummy values for tests)
107+
GITHUB_CLIENT_ID: test-github-client-id
108+
GITHUB_CLIENT_SECRET: test-github-client-secret
109+
GOOGLE_CLIENT_ID: test-google-client-id
110+
GOOGLE_CLIENT_SECRET: test-google-client-secret
111+
112+
# External services (use dummy values for tests)
113+
RESEND_API_KEY: test-resend-api-key
114+
VERCEL_CLIENT_ID: test-vercel-client-id
115+
VERCEL_CLIENT_SECRET: test-vercel-client-secret
116+
117+
# Dashboard-specific (use dummy values for tests)
118+
AUTUMN_SECRET_KEY: test-autumn-secret-key
119+
NEXT_PUBLIC_API_URL: http://localhost:3000/api
87120

88-
# API keys (use dummy values for tests)
121+
# Other API keys (use dummy values for tests)
89122
EMAIL_API_KEY: test-email-api-key
90123
IP_HASH_SALT: test-ip-hash-salt
91124

0 commit comments

Comments
 (0)