2
0
Files
bot/.github/workflows/playwright.yml
2022-06-17 07:08:37 +02:00

41 lines
1.5 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
- name: Install dependencies
run: yarn
- name: Build dependencies
run: yarn turbo run build --scope=builder --include-dependencies
- name: Install Playwright
run: npx playwright install --with-deps
- name: Run tests
working-directory: ./apps/builder
run: yarn 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