From b0d9c184bbfab41a4974625e810aeeeb296483d1 Mon Sep 17 00:00:00 2001 From: Niall Maher Date: Mon, 8 Jan 2024 17:42:51 +0100 Subject: [PATCH] Test env variables on PRs --- .github/workflows/playwright.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 42dc4325..68cfed4f 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -2,8 +2,9 @@ name: Playwright Tests on: push: branches: [develop] - pull_request: + pull_request_target: branches: [develop] + types: [opened, synchronize, reopened, ready_for_review] jobs: test: timeout-minutes: 60 @@ -17,6 +18,11 @@ jobs: run: npm ci - name: Install Playwright Browsers run: npx playwright install --with-deps + - name: "check is DATABASE_URL exists" + env: + DATABASE_URL: ${{ secrets.DATABASE_URL }} + if: ${{ env.DATABASE_URL == '' }} + run: echo "The secret \"DATABASE_URL\" has not been made; echo please go to \"settings \> secrets \> actions\" to create it - name: Run Playwright tests run: npx playwright test - uses: actions/upload-artifact@v3 @@ -24,4 +30,4 @@ jobs: with: name: playwright-report path: playwright-report/ - retention-days: 30 \ No newline at end of file + retention-days: 30