workflows/tests: run some jobs on push.

We need to do this to:
- populate the cache from the latest master (so it can be used in other
  branches/PRs/merge groups)
- send coverage/test flakiness information to CodeCov/BuildPulse on
  `master` builds
This commit is contained in:
Mike McQuaid 2024-12-20 08:23:37 +00:00
parent 3fc8f6f596
commit 317742db2b
No known key found for this signature in database

View File

@ -1,6 +1,9 @@
name: CI name: CI
on: on:
push:
branches:
- master
pull_request: pull_request:
merge_group: merge_group:
@ -138,7 +141,7 @@ jobs:
formula-audit: formula-audit:
name: formula audit name: formula audit
needs: syntax needs: syntax
if: github.repository_owner == 'Homebrew' if: github.repository_owner == 'Homebrew' && github.event_name != 'push'
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: ghcr.io/homebrew/brew:master image: ghcr.io/homebrew/brew:master
@ -163,7 +166,7 @@ jobs:
cask-audit: cask-audit:
name: cask audit name: cask audit
needs: syntax needs: syntax
if: github.repository_owner == 'Homebrew' if: github.repository_owner == 'Homebrew' && github.event_name != 'push'
runs-on: macos-15 runs-on: macos-15
steps: steps:
- name: Set up Homebrew - name: Set up Homebrew
@ -218,7 +221,7 @@ jobs:
name: ${{ matrix.name }} name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }}
needs: syntax needs: syntax
if: github.event_name == 'pull_request' || github.event_name == 'merge_group' if: github.event_name != 'push'
strategy: strategy:
matrix: matrix:
include: include:
@ -242,6 +245,7 @@ jobs:
brew update-test --commit=HEAD brew update-test --commit=HEAD
tests: tests:
if: github.event_name != 'push'
name: ${{ matrix.name }} name: ${{ matrix.name }}
needs: syntax needs: syntax
runs-on: ${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }}
@ -378,7 +382,7 @@ jobs:
test-default-formula: test-default-formula:
name: ${{ matrix.name }} name: ${{ matrix.name }}
needs: syntax needs: syntax
if: github.repository_owner == 'Homebrew' if: github.repository_owner == 'Homebrew' && github.event_name != 'push'
runs-on: ${{ matrix.runs-on }} runs-on: ${{ matrix.runs-on }}
container: ${{ matrix.container }} container: ${{ matrix.container }}
strategy: strategy: