diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7f8b68a677b34..cf38917cc069c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -81,7 +81,7 @@ jobs: name: tap syntax needs: syntax if: github.repository_owner == 'Homebrew' - runs-on: ubuntu-22.04 + runs-on: macos-14 steps: - name: Set up Homebrew id: set-up-homebrew @@ -142,7 +142,9 @@ jobs: name: formula audit needs: syntax if: github.repository_owner == 'Homebrew' - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest + container: + image: ghcr.io/homebrew/brew:master steps: - name: Set up Homebrew id: set-up-homebrew @@ -251,10 +253,10 @@ jobs: include: - name: tests (online) test-flags: --online --coverage - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest - name: tests (generic OS) test-flags: --generic --coverage - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest - name: tests (Ubuntu 22.04) test-flags: --coverage runs-on: ubuntu-22.04 @@ -272,7 +274,10 @@ jobs: id: set-up-homebrew uses: Homebrew/actions/setup-homebrew@master with: - core: true + # We only test needs_homebrew_core tests on macOS because + # homebrew/core is not available by default on GitHub-hosted Ubuntu + # runners, and it's expensive to tap it. + core: ${{ runner.os == 'macOS' }} cask: false test-bot: false @@ -360,13 +365,16 @@ jobs: needs: syntax if: github.repository_owner == 'Homebrew' runs-on: ${{ matrix.runs-on }} + container: ${{ matrix.container }} strategy: matrix: include: - name: test default formula (Ubuntu 22.04) - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest + container: ghcr.io/homebrew/ubuntu22.04:master - name: test default formula (Ubuntu 20.04) - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest + container: ghcr.io/homebrew/ubuntu20.04 - name: test default formula (macOS 13 x86_64) runs-on: macos-13 - name: test default formula (macOS 14 arm64)