From 8a9bd83e60c2f4e7a206244ecd1062706a082965 Mon Sep 17 00:00:00 2001 From: William Huster Date: Sat, 9 Nov 2024 14:29:48 -0500 Subject: [PATCH 1/3] Updated GH Action playwright.yml --- .../.github/workflows/playwright.yml | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml b/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml index 6c5479b32..42c0eeb8f 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml @@ -7,18 +7,25 @@ jobs: runs-on: ubuntu-latest if: github.event.deployment_status.state == 'success' steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: 18 - name: Install dependencies - run: npm --prefix ./client i + working-directory: ./client + run: npm install - name: Install Playwright - run: npx --prefix ./client playwright install --with-deps + working-directory: ./client + run: npx playwright install --with-deps - name: Run Playwright tests - run: npx --prefix ./client playwright test --reporter=html + working-directory: ./client + run: npx playwright test --reporter=html env: - PLAYWRIGHT_TEST_BASE_URL: - {{ "${{ github.event.deployment_status.environment_url }}" }} - PLAYWRIGHT_TEST_USER_PASS: - {{ "${{ secrets.PLAYWRIGHT_TEST_USER_PASS }}" }} + PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.environment_url }} + PLAYWRIGHT_TEST_USER_PASS: ${{ secrets.PLAYWRIGHT_TEST_USER_PASS }} + - uses: actions/upload-artifact@v4 + if: failure() + with: + name: playwright-report + path: ./client/playwright-report/ + retention-days: 30 From fee2d6f7a525e2c28a65dffd69133ac3807f1ffa Mon Sep 17 00:00:00 2001 From: William Huster Date: Sat, 9 Nov 2024 14:34:59 -0500 Subject: [PATCH 2/3] Fix for cookiecutter interpolation --- .../.github/workflows/playwright.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml b/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml index 42c0eeb8f..433b91b77 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml @@ -21,8 +21,8 @@ jobs: working-directory: ./client run: npx playwright test --reporter=html env: - PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.environment_url }} - PLAYWRIGHT_TEST_USER_PASS: ${{ secrets.PLAYWRIGHT_TEST_USER_PASS }} + PLAYWRIGHT_TEST_BASE_URL: {{ ${{ github.event.deployment_status.environment_url }} }} + PLAYWRIGHT_TEST_USER_PASS: {{ ${{ secrets.PLAYWRIGHT_TEST_USER_PASS }} }} - uses: actions/upload-artifact@v4 if: failure() with: From 0959d55742522066c18d86dcb8c119dee6e58ccb Mon Sep 17 00:00:00 2001 From: William Huster Date: Sat, 9 Nov 2024 14:44:29 -0500 Subject: [PATCH 3/3] Quotes are needed --- .../.github/workflows/playwright.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml b/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml index 433b91b77..e771ec7d8 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml @@ -21,8 +21,8 @@ jobs: working-directory: ./client run: npx playwright test --reporter=html env: - PLAYWRIGHT_TEST_BASE_URL: {{ ${{ github.event.deployment_status.environment_url }} }} - PLAYWRIGHT_TEST_USER_PASS: {{ ${{ secrets.PLAYWRIGHT_TEST_USER_PASS }} }} + PLAYWRIGHT_TEST_BASE_URL: {{ "${{ github.event.deployment_status.environment_url }}" }} + PLAYWRIGHT_TEST_USER_PASS: {{ "${{ secrets.PLAYWRIGHT_TEST_USER_PASS }}" }} - uses: actions/upload-artifact@v4 if: failure() with: