From 2f542cc1e309837442e078cb60c158cb2a56e21e Mon Sep 17 00:00:00 2001 From: Chuck Grindel Date: Wed, 13 Dec 2023 17:59:15 -0700 Subject: [PATCH] Pass os to the action. --- .github/actions/run_bazel_test/action.yaml | 4 +++- .github/workflows/workflow.yaml | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/run_bazel_test/action.yaml b/.github/actions/run_bazel_test/action.yaml index 5481a39..a691262 100644 --- a/.github/actions/run_bazel_test/action.yaml +++ b/.github/actions/run_bazel_test/action.yaml @@ -4,11 +4,13 @@ description: Handles platform-specific settings. inputs: working-directory: type: string + os: + type: string runs: using: composite env: - BAZEL_SH: ${{ runner.os == 'Windows' && 'C:\msys64\usr\bin\bash.exe' || '' }} + BAZEL_SH: ${{ startswith(inputs.os, 'windows-') && 'C:\msys64\usr\bin\bash.exe' || '' }} RBT_WORKING_DIR: ${{ inputs.working-directory }} steps: - shell: bash diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 0b838d7..26071ff 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -62,10 +62,13 @@ jobs: - name: Run Bazel test at root if: ${{ matrix.bazel_mode == 'workspace' }} uses: ./.github/actions/run_bazel_test + with: + os: ${{ matrix.os }} - name: Run Bazel test under tests directory uses: ./.github/actions/run_bazel_test with: working-directory: tests + os: ${{ matrix.os }} # - name: Run tests (bzlmod) # if: matrix.bazel_mode == 'module'