diff --git a/.github/actions/deploy-to-github-pages/action.yml b/.github/actions/deploy-to-github-pages/action.yml index eab624eba9..e918022306 100644 --- a/.github/actions/deploy-to-github-pages/action.yml +++ b/.github/actions/deploy-to-github-pages/action.yml @@ -198,6 +198,7 @@ runs: run: sudo sh -c 'echo "185.199.108.153 git-scm.com" >>/etc/hosts' - name: Run Playwright tests shell: bash + id: playwright env: PLAYWRIGHT_TEST_URL: ${{ steps.pages.outputs.base_url }} run: | @@ -206,9 +207,10 @@ runs: https://*|http://git-scm.com) ;; # okay, leave as-is http://*) PLAYWRIGHT_TEST_URL="https://${PLAYWRIGHT_TEST_URL#http://}";; esac && + echo "result=$PLAYWRIGHT_TEST_URL" >>$GITHUB_OUTPUT && npx playwright test --project=chrome - uses: actions/upload-artifact@v4 - if: always() + if: always() && steps.playwright.outputs.result != '' with: name: playwright-report path: playwright-report/ \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 418873d8d7..84dcf65157 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,11 +79,14 @@ jobs: - name: Install @playwright/test run: npm install @playwright/test - name: Run Playwright tests + id: playwright env: PLAYWRIGHT_TEST_URL: http://localhost:5000/ - run: npx playwright test --project=chrome + run: | + echo "result:$PLAYWRIGHT_TEST_URL" >>$GITHUB_OUTPUT && + npx playwright test --project=chrome - uses: actions/upload-artifact@v4 - if: always() + if: always() && steps.playwright.outputs.result != '' with: name: playwright-report path: playwright-report/ \ No newline at end of file