forked from stack-auth/stack
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (50 loc) · 1.63 KB
/
e2e-api-tests.yaml
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
name: Runs E2E API Tests
on:
push:
branches:
- dev
- main
pull_request:
branches:
- dev
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 9.1.2
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Create .env.production.local file for stack-backend
run: cp apps/backend/.env.development apps/backend/.env.production.local
- name: Create .env.production.local file for stack-dashboard
run: cp apps/dashboard/.env.development apps/dashboard/.env.production.local
- name: Build stack-backend
run: pnpm build:backend
- name: Build stack-dashboard
run: pnpm build:dashboard
- name: Start Docker Compose
run: docker-compose -f dependencies.compose.yaml up -d
- name: Initialize database
run: pnpm run prisma -- migrate reset --force
- name: Start stack-backend in background
run: pnpm run start:backend &
- name: Wait for stack-backend to start
run: npx [email protected] http://localhost:8102
- name: Start stack-dashboard in background
run: pnpm run start:dashboard &
- name: Wait for stack-dashboard to start
run: npx [email protected] http://localhost:8101
- name: Run tests
run: pnpm test