stack/.github/workflows/e2e-api-tests.yaml
Zai Shi 019738aa64
Added fern docs (#76)
* adding openapi generation

* added optional responses

* added path params

* added request body

* added full openapi file

* fixed crud bug

* fixed small bugs

* added generate-docs script

* added parameter example

* create docs from handler

* improved parse openapi interface

* removed unused

* added endpoint metadata

* added current user handler

* migrated old docs to fern

* 🌿 api set-up (#75)

Co-authored-by: Catherine Deskur <chdeskur@gmail.com>

* added sdk docs

* updated tabs

* improved styling

* added header links

* added tags to docs

* added focus to docs

* added focus to team docs

* improved docs wording

* added discord link

* updated generate-keys docs

* fixed merge error

* added yaml package

* added github actions

* fixed doc gen bug

* added docs lint check

* added doc watch changes

* updated github actions

* fixed action file

* updated publish docs workflow

* added overview page

* fixed action bug

---------

Co-authored-by: fern <126544928+fern-bot@users.noreply.github.com>
Co-authored-by: Catherine Deskur <chdeskur@gmail.com>
2024-06-15 14:04:00 +02:00

75 lines
2.1 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: Create .env.local file for stack-server
run: |
cat > packages/stack-server/.env.local <<EOF
NEXT_PUBLIC_STACK_URL=http://localhost:8101
NEXT_PUBLIC_STACK_PROJECT_ID=internal
NEXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY=internal-project-client-api-key
STACK_SECRET_SERVER_KEY=internal-project-server-api-key
SERVER_SECRET=23-wuNpik0gIW4mruTz25rbIvhuuvZFrLOLtL7J4tyo
EMAIL_HOST=0.0.0.0
EMAIL_PORT=2500
EMAIL_USERNAME=some-username
EMAIL_PASSWORD=some-password
EMAIL_SENDER=noreply@example.com
DATABASE_CONNECTION_STRING=postgres://postgres:password@localhost:5432/stackframe
DIRECT_DATABASE_CONNECTION_STRING=postgres://postgres:password@localhost:5432/stackframe
EOF
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Start Docker Compose
run: docker-compose -f dependencies.compose.yaml up -d
- name: Initialize database
run: pnpm run prisma:server -- migrate reset --force
- name: Build stack-server
run: pnpm build:server
- name: Start stack-server in background
run: pnpm -C packages/stack-server start &
- name: Wait for stack-server to start
run: npx wait-on@7.2.0 http://localhost:8101
- name: Run tests
run: pnpm -C apps/e2e test:ci
env:
SERVER_BASE_URL: http://localhost:8101
INTERNAL_PROJECT_ID: internal
INTERNAL_PROJECT_CLIENT_KEY: internal-project-client-api-key