diff --git a/.github/workflows/smoke-test-daily.yml b/.github/workflows/smoke-test-daily.yml index 5e65ff5b1cf..fd44b390f24 100644 --- a/.github/workflows/smoke-test-daily.yml +++ b/.github/workflows/smoke-test-daily.yml @@ -66,16 +66,6 @@ jobs: permissions: contents: read needs: [api-tests] - env: - ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }} - ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }} - ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }} - ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-report - ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-results - BASE_URL: ${{ secrets.SMOKE_TEST_URL }} - CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }} - CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }} - DEFAULT_TIMEOUT_OVERRIDE: 120000 steps: - uses: actions/checkout@v3 @@ -86,33 +76,25 @@ jobs: install-filters: woocommerce build: false - - name: Download and install Chromium browser. - working-directory: plugins/woocommerce - run: pnpm exec playwright install chromium - - - name: Run E2E tests. + - name: Run E2E tests + id: run-e2e-composite-action timeout-minutes: 60 - working-directory: plugins/woocommerce + uses: ./.github/actions/tests/run-e2e-tests + with: + report-name: ${{ env.E2E_ARTIFACT }} + tests: basic.spec.js # mytodo: remove env: + ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }} + ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }} + ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }} + ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-report + ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-results + BASE_URL: ${{ secrets.SMOKE_TEST_URL }} + CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }} + CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }} + DEFAULT_TIMEOUT_OVERRIDE: 120000 E2E_MAX_FAILURES: 25 RESET_SITE: true - run: pnpm exec playwright test --config=tests/e2e-pw/playwright.config.js - - - name: Generate Playwright E2E Test report. - if: success() || failure() - working-directory: plugins/woocommerce - run: pnpm exec allure generate --clean ${{ env.ALLURE_RESULTS_DIR }} --output ${{ env.ALLURE_REPORT_DIR }} - - - name: Archive E2E test report - if: success() || failure() - uses: actions/upload-artifact@v3 - with: - name: ${{ env.E2E_ARTIFACT }} - path: | - ${{ env.ALLURE_RESULTS_DIR }} - ${{ env.ALLURE_REPORT_DIR }} - if-no-files-found: ignore - retention-days: 5 k6-tests: name: k6 tests on nightly build