Repository navigation
scheduled tests #1480
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: scheduled tests | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: "Branch of this repository, or refs/pull/<number>/head for a PR from a fork (only after reviewing that commit: the run gets the cloud credentials)" | |
| type: string | |
| required: true | |
| default: "main" | |
| schedule: | |
| - cron: "0 */2 * * *" # Every 2 hours; disable via GitHub UI or let SCHEDULED_TESTS_UNTIL expire | |
| permissions: | |
| contents: read | |
| jobs: | |
| schedule-gate: | |
| name: 🗓️ Schedule Gate | |
| runs-on: ubuntu-latest | |
| # A few seconds. Without a limit, a hung job runs until the GitHub default of 6 hours | |
| timeout-minutes: 5 | |
| if: github.event_name == 'schedule' | |
| outputs: | |
| enabled: ${{ steps.check.outputs.enabled }} | |
| steps: | |
| - name: Check SCHEDULED_TESTS_UNTIL | |
| id: check | |
| run: | | |
| until_date="${{ vars.SCHEDULED_TESTS_UNTIL }}" | |
| if [[ -z "$until_date" ]]; then | |
| echo "SCHEDULED_TESTS_UNTIL not set — skipping" | |
| echo "enabled=false" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| now=$(date -u +%s) | |
| until=$(date -u -d "$until_date 23:59:59" +%s) | |
| if (( now <= until )); then | |
| echo "Schedule active until $until_date" | |
| echo "enabled=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "Schedule window expired on $until_date" | |
| echo "enabled=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| scheduled-desktop-web: | |
| name: 🗓️ 💻 Scheduled Desktop Web Tests on LambdaTest | |
| runs-on: ubuntu-latest | |
| # Usually 2-3 minutes. Without a limit, a hung job runs until the GitHub default of 6 hours | |
| timeout-minutes: 20 | |
| needs: [schedule-gate] | |
| if: >- | |
| always() && ( | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'schedule' && needs.schedule-gate.outputs.enabled == 'true') | |
| ) | |
| steps: | |
| - name: ⬇️ Checkout Repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| ref: ${{ inputs.branch || vars.SCHEDULED_TESTS_BRANCH || 'main' }} | |
| - name: 📦 Setup pnpm | |
| uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 | |
| - name: 🟢 Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: pnpm | |
| - name: 🧩 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏗️ Build | |
| working-directory: ./ | |
| run: pnpm build | |
| - name: 🧪 Run linting and unit tests | |
| working-directory: ./ | |
| run: pnpm test | |
| - name: 🖥️ 🌐 Run Desktop Web e2e tests | |
| working-directory: ./ | |
| env: | |
| LAMBDATEST_USERNAME: ${{ secrets.LAMBDATEST_USERNAME }} | |
| LAMBDATEST_ACCESS_KEY: ${{ secrets.LAMBDATEST_ACCESS_KEY }} | |
| BUILD_PREFIX: true | |
| run: pnpm test.lambdatest.desktop --maxConcurrency=3 | |
| - name: 📤 Upload artifacts | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| if: failure() | |
| with: | |
| name: scheduled-desktop-web-logs | |
| include-hidden-files: true | |
| path: | | |
| logs/*.log | |
| .tmp/ | |
| !.tmp/checkActual/ | |
| !.tmp/saveActual/ | |
| !.tmp/testDiff/ | |
| !.next/ | |
| scheduled-android-web: | |
| name: 🗓️ 🤖 🌐 Scheduled Android Web Tests on LambdaTest | |
| runs-on: ubuntu-latest | |
| # Usually 5-17 minutes; failing checks with retries can take 30+. Without a limit, a hung job runs until the GitHub default of 6 hours | |
| timeout-minutes: 45 | |
| needs: [schedule-gate] | |
| if: >- | |
| always() && ( | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'schedule' && needs.schedule-gate.outputs.enabled == 'true') | |
| ) | |
| steps: | |
| - name: ⬇️ Checkout Repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| ref: ${{ inputs.branch || vars.SCHEDULED_TESTS_BRANCH || 'main' }} | |
| - name: 📦 Setup pnpm | |
| uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 | |
| - name: 🟢 Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: pnpm | |
| - name: 🧩 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏗️ Build | |
| working-directory: ./ | |
| run: pnpm build | |
| - name: 🧪 Run linting and unit tests | |
| working-directory: ./ | |
| run: pnpm test | |
| - name: 🤖 🌐 Run Android Web e2e tests | |
| working-directory: ./ | |
| env: | |
| LAMBDATEST_USERNAME: ${{ secrets.LAMBDATEST_USERNAME }} | |
| LAMBDATEST_ACCESS_KEY: ${{ secrets.LAMBDATEST_ACCESS_KEY }} | |
| BUILD_PREFIX: true | |
| run: pnpm test.lambdatest.emu.web --maxConcurrency=6 | |
| - name: 📤 Upload artifacts | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| if: failure() | |
| with: | |
| name: scheduled-android-web-logs | |
| include-hidden-files: true | |
| path: | | |
| logs/*.log | |
| .tmp/ | |
| !.tmp/checkActual/ | |
| !.tmp/saveActual/ | |
| !.tmp/testDiff/ | |
| !.next/ | |
| scheduled-ios-web: | |
| name: 🗓️ 🍏 🌐 Scheduled iOS Web Tests on LambdaTest | |
| runs-on: ubuntu-latest | |
| # Usually 5-17 minutes; failing checks with retries can take 30+. Without a limit, a hung job runs until the GitHub default of 6 hours | |
| timeout-minutes: 45 | |
| needs: [schedule-gate] | |
| if: >- | |
| always() && ( | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'schedule' && needs.schedule-gate.outputs.enabled == 'true') | |
| ) | |
| steps: | |
| - name: ⬇️ Checkout Repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| ref: ${{ inputs.branch || vars.SCHEDULED_TESTS_BRANCH || 'main' }} | |
| - name: 📦 Setup pnpm | |
| uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 | |
| - name: 🟢 Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: pnpm | |
| - name: 🧩 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏗️ Build | |
| working-directory: ./ | |
| run: pnpm build | |
| - name: 🧪 Run linting and unit tests | |
| working-directory: ./ | |
| run: pnpm test | |
| - name: 🍏 🌐 Run iOS Web e2e tests | |
| working-directory: ./ | |
| env: | |
| LAMBDATEST_USERNAME: ${{ secrets.LAMBDATEST_USERNAME }} | |
| LAMBDATEST_ACCESS_KEY: ${{ secrets.LAMBDATEST_ACCESS_KEY }} | |
| BUILD_PREFIX: true | |
| run: pnpm test.lambdatest.sims.web --maxConcurrency=4 | |
| - name: 📤 Upload artifacts | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| if: failure() | |
| with: | |
| name: scheduled-ios-web-logs | |
| include-hidden-files: true | |
| path: | | |
| logs/*.log | |
| .tmp/ | |
| !.tmp/checkActual/ | |
| !.tmp/saveActual/ | |
| !.tmp/testDiff/ | |
| !.next/ | |
| scheduled-app: | |
| name: 🗓️ 📱 Scheduled Mobile App Tests on Sauce | |
| runs-on: ubuntu-latest | |
| # Usually 5-17 minutes; failing checks with retries can take 30+. Without a limit, a hung job runs until the GitHub default of 6 hours | |
| timeout-minutes: 45 | |
| needs: [schedule-gate] | |
| if: >- | |
| always() && ( | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'schedule' && needs.schedule-gate.outputs.enabled == 'true') | |
| ) | |
| steps: | |
| - name: ⬇️ Checkout Repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| ref: ${{ inputs.branch || vars.SCHEDULED_TESTS_BRANCH || 'main' }} | |
| - name: 📦 Setup pnpm | |
| uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 | |
| - name: 🟢 Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: pnpm | |
| - name: 🧩 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏗️ Build | |
| working-directory: ./ | |
| run: pnpm build | |
| - name: 🧪 Run linting and unit tests | |
| working-directory: ./ | |
| run: pnpm test | |
| - name: 😶🌫️ 📱 Run App e2e tests | |
| working-directory: ./ | |
| env: | |
| SAUCE_USERNAME_WDIO_ICS: ${{ secrets.SAUCE_USERNAME_WDIO_ICS }} | |
| SAUCE_ACCESS_KEY_WDIO_ICS: ${{ secrets.SAUCE_ACCESS_KEY_WDIO_ICS }} | |
| BUILD_PREFIX: true | |
| run: pnpm test.saucelabs.app --maxConcurrency=20 | |
| - name: 📤 Upload artifacts | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| if: failure() | |
| with: | |
| name: scheduled-mobile-app-logs | |
| include-hidden-files: true | |
| path: | | |
| logs/*.log | |
| .tmp/ | |
| !.tmp/checkActual/ | |
| !.tmp/saveActual/ | |
| !.tmp/testDiff/ | |
| !.next/ | |
| scheduled-ocr: | |
| name: 🗓️ 🔎 Scheduled OCR Tests on LambdaTest | |
| runs-on: ubuntu-latest | |
| # Usually 2-3 minutes. Without a limit, a hung job runs until the GitHub default of 6 hours | |
| timeout-minutes: 20 | |
| needs: [schedule-gate] | |
| if: >- | |
| always() && ( | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'schedule' && needs.schedule-gate.outputs.enabled == 'true') | |
| ) | |
| steps: | |
| - name: ⬇️ Checkout Repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| ref: ${{ inputs.branch || vars.SCHEDULED_TESTS_BRANCH || 'main' }} | |
| - name: 📦 Setup pnpm | |
| uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 | |
| - name: 🟢 Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: pnpm | |
| - name: 🧩 Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 🏗️ Build | |
| working-directory: ./ | |
| run: pnpm build | |
| - name: 🧪 Run linting and unit tests | |
| working-directory: ./ | |
| run: pnpm test | |
| - name: 😶🌫️ 🔎 Run OCR e2e tests | |
| working-directory: ./ | |
| env: | |
| LAMBDATEST_USERNAME: ${{ secrets.LAMBDATEST_USERNAME }} | |
| LAMBDATEST_ACCESS_KEY: ${{ secrets.LAMBDATEST_ACCESS_KEY }} | |
| BUILD_PREFIX: true | |
| run: pnpm test.ocr.lambdatest.desktop --maxConcurrency=1 | |
| - name: 📤 Upload artifacts | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| if: failure() | |
| with: | |
| name: scheduled-ocr-logs | |
| include-hidden-files: true | |
| path: | | |
| logs/*.log | |
| .tmp/ | |
| !.next/ |