diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index c75de6d7..b1199c56 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -28,6 +28,7 @@ jobs: run: npx playwright test tests/${{ matrix.tests-name}}.spec.ts env: BASE_URL: ${{ github.event.deployment_status.environment_url }} + TEST_NAME: ${{ matrix.tests-name}} - name: Upload blob report to GitHub Actions Artifacts if: always() uses: actions/upload-artifact@v4 @@ -66,7 +67,7 @@ jobs: - name: Upload HTML report uses: actions/upload-artifact@v4 with: - name: playwright-report-${{ github.run_id}} + name: playwright-report-${{github.run_id}} path: ./playwright-report retention-days: 14 diff --git a/integration-test/playwright.config.ts b/integration-test/playwright.config.ts index eee4995d..cf3bbd1d 100644 --- a/integration-test/playwright.config.ts +++ b/integration-test/playwright.config.ts @@ -19,7 +19,7 @@ export default defineConfig({ // Limit the number of failures on CI to save resources maxFailures: process.env.CI ? 25 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ - reporter: process.env.CI ? 'blob' : 'html', + reporter: process.env.CI ? [['blob', {fileName: `report-${process.env.TEST_NAME}.zip`}]] : 'html', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { timezoneId: 'Asia/Taipei',