mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-19 17:59:05 -05:00
.github/workflows: Run unit tests when go.mod/go.sum files change
In our checks workflow we try to skip running unit tests unless Go files have changed, but we didn't previously consider "go.mod" and "go.sum" as "Go files". Changes to our dependencies can change the results of our tests, so we should run tests even if only the dependencies have changed. Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
This commit is contained in:
2
.github/workflows/checks.yml
vendored
2
.github/workflows/checks.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
||||
- id: diff
|
||||
run: |
|
||||
git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin ${{github.event.pull_request.base.ref}}
|
||||
echo "go=$(git diff --name-only origin/${{github.event.pull_request.base.ref}} | grep -e '\.go' -e '\.github' | wc -l)" | tee -a "$GITHUB_OUTPUT"
|
||||
echo "go=$(git diff --name-only origin/${{github.event.pull_request.base.ref}} | grep -e '\.go' -e '\.github' -e 'go\.mod' -e 'go\.sum' | wc -l)" | tee -a "$GITHUB_OUTPUT"
|
||||
outputs:
|
||||
go: ${{ steps.diff.outputs.go }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user