Skip to content

Commit 78b75e4

Browse files
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.
1 parent c0dd000 commit 78b75e4

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ jobs:
1515
matrix:
1616
node-version: [20]
1717
runner: [ubuntu-latest, windows-latest, macos-14]
18+
# Exclude windows and macos from being built on feature branches
19+
on-next-branch:
20+
- ${{ github.ref == 'refs/heads/next' }}
21+
exclude:
22+
- on-next-branch: false
23+
runner: windows-latest
24+
- on-next-branch: false
25+
runner: macos-14
1826

1927
runs-on: ${{ matrix.runner }}
2028
timeout-minutes: 30
@@ -79,3 +87,10 @@ jobs:
7987

8088
- name: Run Playwright tests
8189
run: npm run test:ui
90+
91+
- name: Notify Discord
92+
if: failure() && github.ref == 'refs/heads/next'
93+
uses: discord-actions/message@v2
94+
with:
95+
webhookUrl: ${{ secrets.DISCORD_WEBHOOK_URL }}
96+
message: 'Oh noes! A build on `next` failed!'

integrations/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export function test(
7474
) {
7575
return (only || (!process.env.CI && debug) ? defaultTest.only : defaultTest)(
7676
name,
77-
{ timeout: TEST_TIMEOUT },
77+
{ timeout: TEST_TIMEOUT, retry: 3 },
7878
async (options) => {
7979
let rootDir = debug ? path.join(REPO_ROOT, '.debug') : TMP_ROOT
8080
await fs.mkdir(rootDir, { recursive: true })

0 commit comments

Comments
 (0)