Files
bot/.github/workflows/playwright.yml
Baptiste Arnaud ee338f62dc build: add pnpm
2022-08-10 18:49:06 +02:00

42 lines
1.6 KiB
YAML

name: Playwright Tests
on:
deployment_status:
jobs:
test-builder:
timeout-minutes: 60
runs-on: ubuntu-latest
if: ${{ github.event.deployment_status.state == 'success' && contains(github.event.deployment_status.environment, 'builder')}}
steps:
- name: Log Info
run: echo ${{ github.event.deployment_status.target_url }} && echo ${{ github.event.deployment }} && echo ${{ github.event.deployment_status.environment }}
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.2.2
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Build dependencies
run: pnpm turbo run build --filter="builder^..."
- name: Install Playwright
run: npx playwright install --with-deps
- name: Run tests
working-directory: ./apps/builder
run: pnpm test
env:
PLAYWRIGHT_BUILDER_TEST_BASE_URL: ${{ github.event.deployment_status.target_url }}
DATABASE_URL: ${{ secrets.TEST_DATABASE_URL }}
SMTP_HOST: smtp.ethereal.email
SMTP_PORT: 587
SMTP_SECURE: false
SMTP_USERNAME: tobin.tillman65@ethereal.email
SMTP_PASSWORD: Ty9BcwCBrK6w8AG2hx
STRIPE_TEST_PUBLIC_KEY: pk_test_fYwf5fyL66hiRIkFVcpStukl00K1MTPPmG
STRIPE_TEST_SECRET_KEY: ${{ secrets.STRIPE_TEST_SECRET_KEY }}
ENCRYPTION_SECRET: ${{ secrets.ENCRYPTION_SECRET }}
- name: Upload test results
if: always()
uses: actions/upload-artifact@v2
with:
name: playwright-results
path: ./apps/builder/playwright-report