From c51f6278d234a84948a71edb86781b3d5842e85c Mon Sep 17 00:00:00 2001 From: Ruoyu Zhong Date: Tue, 24 Sep 2024 23:55:19 +0800 Subject: [PATCH] workflows/tests: only run RSpec tests with core tap on macOS It's expensive to tap `homebrew/core` on GitHub-hosted Ubuntu runners, and using the container requires tricks to make Codecov work. So, we rely on macOS to provide coverage for the needs_homebrew_core RSpec tests. --- .github/workflows/tests.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index aa469bc2bfe500..96382a746df08e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -244,26 +244,21 @@ jobs: name: ${{ matrix.name }} needs: syntax runs-on: ${{ matrix.runs-on }} - container: ${{ matrix.container }} strategy: matrix: include: - name: tests (online) test-flags: --online --coverage runs-on: ubuntu-latest - container: ghcr.io/homebrew/brew:master - name: tests (generic OS) test-flags: --generic --coverage runs-on: ubuntu-latest - container: ghcr.io/homebrew/brew:master - name: tests (Ubuntu 22.04) test-flags: --coverage runs-on: ubuntu-latest - container: ghcr.io/homebrew/ubuntu22.04:master - name: tests (Ubuntu 20.04) test-flags: --coverage runs-on: ubuntu-latest - container: ghcr.io/homebrew/ubuntu20.04 - name: tests (macOS 13 x86_64) test-flags: --coverage runs-on: macos-13 @@ -275,7 +270,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