This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
Merge pull request #295 from juruen/dependabot/go_modules/golang.org/… #287
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 | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.19 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v1 | |
- name: Get dependencies | |
run: | | |
go get -v -t -d ./... | |
if [ -f Gopkg.toml ]; then | |
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh | |
dep ensure | |
fi | |
- name: Format | |
run: | | |
out="$(gofmt -s -l . )" | |
if [ -n "$out" ]; then | |
echo "gofmt needs to be run on the following files:" >&2 | |
echo "$out" >&2 | |
exit 1 | |
fi | |
- name: Build | |
run: go build -v . | |
- name: Tests | |
run: go test ./... |