name: Playwright Tests on: push: branches: [ "main" ] pull_request: branches: [ "main" ] jobs: e2e_tests: timeout-minutes: 60 runs-on: ubuntu-latest services: postgres: image: postgres env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres 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 - name: Install dependencies run: npm ci - name: Copy env run: cp .env.example .env - name: Install Playwright Browsers run: npx playwright install --with-deps - name: Generate Prisma Client run: npm run prisma:generate -w @documenso/prisma - name: Create the database run: npm run prisma:migrate-dev - name: Run Playwright tests run: npm run ci - uses: actions/upload-artifact@v3 if: always() with: name: playwright-report path: playwright-report/ retention-days: 30 env: NEXT_PRIVATE_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/documenso NEXT_PRIVATE_DIRECT_DATABASE_URL: postgresql://postgres:postgres@localhost:5432/documenso TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: ${{ vars.TURBO_TEAM }}