forked from better-auth/better-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
165 lines (135 loc) · 5.36 KB
/
Copy pathe2e.yml
File metadata and controls
165 lines (135 loc) · 5.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
name: E2E
on:
push:
branches: [ main, canary ]
merge_group:
pull_request:
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM || github.repository_owner }}
BETTER_AUTH_TELEMETRY_ENDPOINT: ${{ vars.BETTER_AUTH_TELEMETRY_ENDPOINT }}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.merge_group.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
smoke:
name: Smoke test
timeout-minutes: 30
runs-on: starsling-ubuntu-24.04
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Cache turbo build setup
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
- name: Install
run: pnpm install
- name: Build
run: pnpm build
- name: Start Docker Containers
run: docker compose up -d --wait --wait-timeout 60
- uses: oven-sh/setup-bun@v2
- uses: denoland/setup-deno@e95548e56dfa95d4e1a28d6f422fafe75c4c26fb # v2.0.3
with:
deno-version: 2.6.4
- name: Smoke
run: pnpm e2e:smoke
- name: Stop Docker Containers
run: docker compose down
integration:
name: Integration test
timeout-minutes: 60
runs-on: starsling-ubuntu-24.04
steps:
- name: Skip integration tests in merge queue
if: github.event_name == 'merge_group'
run: echo "Skipping integration tests in merge queue"
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
if: github.event_name != 'merge_group'
with:
fetch-depth: 0
- name: Cache turbo build setup
if: github.event_name != 'merge_group'
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
if: github.event_name != 'merge_group'
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
if: github.event_name != 'merge_group'
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
- name: Install
if: github.event_name != 'merge_group'
run: pnpm install
- name: Install Playwright Browsers
if: github.event_name != 'merge_group'
uses: ./.github/actions/setup-playwright
- name: Start Docker Containers
if: github.event_name != 'merge_group'
run: docker compose up -d --wait --wait-timeout 60
- name: Integration
if: github.event_name != 'merge_group'
run: pnpm e2e:integration --filter=./e2e/integration
- name: Stop Docker Containers
if: github.event_name != 'merge_group'
run: docker compose down
adapter-integration:
name: ${{ matrix.packages }} Integration Test
runs-on: starsling-ubuntu-24.04
strategy:
fail-fast: false
matrix:
packages: [ "@better-auth-test/adapter-factory", "@better-auth-test/drizzle-adapter", "@better-auth-test/kysely-prisma-adapter", "@better-auth-test/memory-adapter", "@better-auth-test/mongo-adapter", "@better-auth-test/prisma-adapter" ]
steps:
- name: Skip integration tests in merge queue
if: github.event_name == 'merge_group'
run: echo "Skipping integration tests in merge queue"
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
if: github.event_name != 'merge_group'
with:
fetch-depth: 0
- name: Cache turbo build setup
if: github.event_name != 'merge_group'
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
if: github.event_name != 'merge_group'
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
if: github.event_name != 'merge_group'
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
- name: Install
if: github.event_name != 'merge_group'
run: pnpm install
- name: Start Docker Containers
if: github.event_name != 'merge_group'
run: docker compose up -d --wait --wait-timeout 60
- name: Adapter Integration
if: github.event_name != 'merge_group'
run: pnpm e2e:integration --filter=${{ matrix.packages }}
- name: Stop Docker Containers
if: github.event_name != 'merge_group'
run: docker compose down