mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
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.local file for stack-backend
|
|
run: cp apps/backend/.env.development apps/backend/.env.production.local
|
|
|
|
- name: Create .env.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-dashboard in background
|
|
run: pnpm run start:dashboard &
|
|
- name: Wait for stack-dashboard to start
|
|
run: npx wait-on@7.2.0 http://localhost:8101
|
|
|
|
- name: Run tests
|
|
run: pnpm test
|