File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 3434 # with:
3535 # version: latest
3636
37+ format :
38+ name : Go Format Check
39+ runs-on : ubuntu-latest
40+ timeout-minutes : 5
41+ steps :
42+ - uses : actions/checkout@v4
43+ - uses : actions/setup-go@v5
44+ with :
45+ go-version-file : ' go.mod'
46+ cache : true
47+ - name : Check Go formatting
48+ run : |
49+ if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then
50+ echo "The following files are not formatted correctly:"
51+ gofmt -l .
52+ echo "Please run 'gofmt -w .' (or configure your IDE to automatically run gofmt upon save) to fix formatting issues."
53+ exit 1
54+ fi
55+
3756 generate :
3857 runs-on : ubuntu-latest
3958 steps :
5473 # Run acceptance tests in a matrix with Terraform CLI versions
5574 test :
5675 name : Terraform Provider Acceptance Tests
57- needs : build
76+ needs : [ build, format]
5877 runs-on : ubuntu-latest
5978 timeout-minutes : 15
6079 strategy :
You can’t perform that action at this time.
0 commit comments