From 78b75e4d966975b49bba1f7df7ba106c26f176b5 Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Tue, 1 Oct 2024 13:45:52 +0200 Subject: [PATCH] Only run Ubuntu tests on feature branches (#14560) This PR changes it so that only the Ubuntu runner starts when doing a pull request. On a successfull `next` merge, all runners shoould start. Furthermore this increases the retry count for integration test to 3. This is mainly so that rare Windows flakes we still see won't become noise when we enabled the Discord notification. --- .github/workflows/ci.yml | 15 +++++++++++++++ integrations/utils.ts | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e397f4686..06b69f5d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,14 @@ jobs: matrix: node-version: [20] runner: [ubuntu-latest, windows-latest, macos-14] + # Exclude windows and macos from being built on feature branches + on-next-branch: + - ${{ github.ref == 'refs/heads/next' }} + exclude: + - on-next-branch: false + runner: windows-latest + - on-next-branch: false + runner: macos-14 runs-on: ${{ matrix.runner }} timeout-minutes: 30 @@ -79,3 +87,10 @@ jobs: - name: Run Playwright tests run: npm run test:ui + + - name: Notify Discord + if: failure() && github.ref == 'refs/heads/next' + uses: discord-actions/message@v2 + with: + webhookUrl: ${{ secrets.DISCORD_WEBHOOK_URL }} + message: 'Oh noes! A build on `next` failed!' diff --git a/integrations/utils.ts b/integrations/utils.ts index 7c18e8452..d524d68f2 100644 --- a/integrations/utils.ts +++ b/integrations/utils.ts @@ -74,7 +74,7 @@ export function test( ) { return (only || (!process.env.CI && debug) ? defaultTest.only : defaultTest)( name, - { timeout: TEST_TIMEOUT }, + { timeout: TEST_TIMEOUT, retry: 3 }, async (options) => { let rootDir = debug ? path.join(REPO_ROOT, '.debug') : TMP_ROOT await fs.mkdir(rootDir, { recursive: true })