Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,25 @@ jobs:
# with:
# version: latest

format:
name: Go Format Check
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Check Go formatting
run: |
if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then
echo "The following files are not formatted correctly:"
gofmt -l .
echo "Please run 'gofmt -w .' (or configure your IDE to automatically run gofmt upon save) to fix formatting issues."
exit 1
fi

generate:
runs-on: ubuntu-latest
steps:
Expand All @@ -54,7 +73,7 @@ jobs:
# Run acceptance tests in a matrix with Terraform CLI versions
test:
name: Terraform Provider Acceptance Tests
needs: build
needs: [build, format]
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
Expand Down
Loading