Skip to content

Commit

Permalink
workflows/tests: only run RSpec tests with core tap on macOS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ZhongRuoyu committed Sep 24, 2024
1 parent 444919f commit c51f627
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit c51f627

Please sign in to comment.