diff --git a/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml b/{{cookiecutter.project_slug}}/.github/workflows/playwright.yml index 6c5479b32..e771ec7d8 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