Skip to content

Commit

Permalink
Only run Ubuntu tests on feature branches (#14560)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
philipp-spiess authored Oct 1, 2024
1 parent c0dd000 commit 78b75e4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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!'
2 changes: 1 addition & 1 deletion integrations/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down

0 comments on commit 78b75e4

Please sign in to comment.