From bf07c977d7310dc847336af64f2a5fb30370111b Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 11 Jul 2024 11:53:35 -0700 Subject: [PATCH] Fix go test workflow --- .github/workflows/go-tests.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/go-tests.yaml b/.github/workflows/go-tests.yaml index 0ff23210a..f8b7272ad 100644 --- a/.github/workflows/go-tests.yaml +++ b/.github/workflows/go-tests.yaml @@ -49,7 +49,6 @@ jobs: test-bsds: runs-on: macos-latest - if: steps.changed-files-yaml.outputs.src_any_changed == 'true' strategy: matrix: os: @@ -61,6 +60,14 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Get changed files + id: changed-files-yaml + uses: tj-actions/changed-files@v44 + with: + files_yaml: | + src: + - '**/*.{go,mod,sum}' + - uses: actions/cache@v4 with: path: | @@ -71,10 +78,12 @@ jobs: go-test- - name: Install go + if: steps.changed-files-yaml.outputs.src_any_changed == 'true' uses: actions/setup-go@v5 with: go-version: '^1' cache: true - name: Run tests + if: steps.changed-files-yaml.outputs.src_any_changed == 'true' run: go test ./...