Added dependabot, update github actions, update go to 1.23 (#34) #185
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go fmt, go vet, go test | |
on: | |
push: | |
pull_request: | |
jobs: | |
lint-verify-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.17 | |
- name: Check formatting with go fmt | |
run: | | |
output=$(gofmt -l -w -d ./pkg/tf-profile) | |
if [ -n "$output" ]; then | |
echo "Code needs to be reformatted:" | |
echo "$output" | |
exit 1 | |
fi | |
- name: Verify code with go vet | |
run: | | |
output=$(go vet ./...) | |
if [ -n "$output" ]; then | |
echo "Code has issues that need to be fixed:" | |
echo "$output" | |
exit 1 | |
fi | |
- name: Run tests | |
run: go test -v ./... |