Skip to content

Bump actions/setup-go from 4 to 5 #58

Bump actions/setup-go from 4 to 5

Bump actions/setup-go from 4 to 5 #58

Workflow file for this run

name: Go
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
go-version: ['1.18', '1.19', '1.20']
name: Go build, test, vet
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
name: Set up Go
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
- name: Vet
run: go vet ./...
- name: Run go generate and check for changes
run: |
if [ ! -f generate.sh ]
then
exit
fi
./generate.sh
diff=$(git status --porcelain)
if [[ -z $diff ]];
then
echo "No changes"
else
echo "Changes detected"
echo $diff
exit 1;
fi