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.
This commit is contained in:
Philipp Spiess 2024-10-01 13:45:52 +02:00 committed by GitHub
parent c0dd000c3c
commit 78b75e4d96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 1 deletions

View File

@ -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!'

View File

@ -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 })