Skip to content

πŸš€ V2 Going Full Stack #14

πŸš€ V2 Going Full Stack

πŸš€ V2 Going Full Stack #14

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master, v2-going-full-stack]
jobs:
E2E:
timeout-minutes: 60
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_BASE_URL: http://localhost:3000
NEXT_PUBLIC_DEV_ENV_NAME: tests
DATABASE_URL: postgres://startui:startui@localhost:5432/startui
NEXT_PUBLIC_IS_DEMO: false
AUTH_SECRET: Replace me with `openssl rand -base64 32` generated secret
EMAIL_SERVER: smtp://username:password@localhost:1025
EMAIL_FROM: Start UI <noreply@example.com>
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: startui
POSTGRES_USER: startui
POSTGRES_DB: startui
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-${{ env.cache-name }}-
${{ runner.os }}-pnpm-store-
${{ runner.os }}-
- name: Install dependencies
run: pnpm install
- name: Install Playwright Browsers
run: pnpm playwright install --with-deps
- name: Migrate database
run: pnpm db:push
- name: Add default data into database
run: pnpm db:seed
- name: Run Playwright tests
run: pnpm e2e
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30