From 01388547e8e37f1a15da38c20bbe8c83d4f1f2a0 Mon Sep 17 00:00:00 2001 From: Jaril Date: Mon, 26 Sep 2022 17:18:42 -0700 Subject: [PATCH] Run tests in Firefox --- .github/workflows/build_test_deploy.yml | 77 +++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/.github/workflows/build_test_deploy.yml b/.github/workflows/build_test_deploy.yml index b64a9526ca456..7b9ce2b26a37c 100644 --- a/.github/workflows/build_test_deploy.yml +++ b/.github/workflows/build_test_deploy.yml @@ -432,6 +432,83 @@ jobs: path: | test/traces + testDevE2EFirefox: + name: Test Development (E2E) (Firefox) + runs-on: ubuntu-latest + needs: [build, build-native-test] + env: + NEXT_TELEMETRY_DISABLED: 1 + NEXT_TEST_JOB: 1 + TEST_TIMINGS_TOKEN: ${{ secrets.TEST_TIMINGS_TOKEN }} + BROWSER_NAME: 'firefox' + strategy: + fail-fast: false + matrix: + node: [16, 18] + group: [1, 2, 3] + steps: + - name: Setup node + uses: actions/setup-node@v3 + if: ${{needs.build.outputs.docsChange == 'nope'}} + with: + node-version: ${{ matrix.node }} + check-latest: true + + - run: echo ${{needs.build.outputs.docsChange}} + + # https://github.com/actions/virtual-environments/issues/1187 + - name: tune linux network + run: sudo ethtool -K eth0 tx off rx off + + - uses: actions/cache@v3 + if: ${{needs.build.outputs.docsChange == 'nope'}} + id: restore-build + with: + path: ./* + key: ${{ github.sha }}-${{ github.run_number }} + + - uses: actions/download-artifact@v3 + if: ${{needs.build.outputs.docsChange == 'nope'}} + with: + name: next-swc-test-binary + path: packages/next-swc/native + + - run: npm i -g pnpm@${PNPM_VERSION} + if: ${{needs.build.outputs.docsChange == 'nope'}} + + - run: npm i -g playwright-chromium@1.22.2 && npx playwright install-deps + if: ${{needs.build.outputs.docsChange == 'nope'}} + + - run: npx @replayio/playwright install chromium + if: ${{needs.build.outputs.docsChange == 'nope'}} + + - run: node run-tests.js --type e2e --timings -g ${{ matrix.group }}/3 --debug + name: Run test/e2e (dev) + if: ${{needs.build.outputs.docsChange == 'nope'}} + env: + RECORD_REPLAY_METADATA_TEST_RUN_TITLE: testDevE2E / Group ${{ matrix.group }} / Node ${{ matrix.node }} + RECORD_ALL_CONTENT: 1 + RECORD_REPLAY: 1 + NEXT_TEST_MODE: dev + # DEBUG: pw:browser* + + - uses: replayio/action-upload@v0.4.5 + if: always() + with: + api-key: rwk_1LfNb6DteBpcQbb5dcy3XZbo1jidYqN5qQr5uYYfiVt + public: true + filter: ${{ 'function($v) { $v.metadata.test.result = "failed" }' }} + + - name: Upload test trace + if: always() + uses: actions/upload-artifact@v3 + with: + name: test-trace + if-no-files-found: ignore + retention-days: 2 + path: | + test/traces + testDevE2EReact17: name: Test Development (E2E) (react v17) runs-on: ubuntu-latest