From d29bb3e6a66fb165ecccacf0bb96cbbab043df60 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Sun, 8 Oct 2023 15:00:13 -0700 Subject: [PATCH] chore: enable some CI on macos again We need at least some coverage, even if we don't have a container runtime there --- .github/workflows/ci.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f41f57ee..5dcccee8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,16 +29,34 @@ jobs: # Will look like ["", "5.3.2"] bazelversions: ${{ toJSON(steps.*.outputs.bazelversion) }} + matrix-prep-os: + # Prepares the 'os' axis of the test matrix + runs-on: ubuntu-latest + env: + TC_CLOUD_TOKEN: ${{ secrets.TC_CLOUD_TOKEN }} + steps: + - id: linux + run: echo "os=ubuntu-latest" >> $GITHUB_OUTPUT + - id: rbe + run: echo "os=macos-latest" >> $GITHUB_OUTPUT + # Don't run MocOS if there is no TestContainers API token which is the case on forks + # We expect to use it at some point for tests that need a docker daemon. + if: ${{ env.TC_CLOUD_TOKEN != '' }} + outputs: + # Will look like ["ubuntu-latest", "macos-latest"] + os: ${{ toJSON(steps.*.outputs.os) }} + test: # The type of runner that the job will run on runs-on: ${{ matrix.os }} needs: - matrix-prep-bazelversion + - matrix-prep-os strategy: fail-fast: false matrix: - os: [ubuntu-latest] + os: ${{ fromJSON(needs.matrix-prep-os.outputs.os) }} bazelversion: ${{ fromJSON(needs.matrix-prep-bazelversion.outputs.bazelversions) }} folder: - .