Snapshot service #10213
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: Lint | |
on: [ push, pull_request ] | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ^1.15 | |
id: go | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Vet | |
run: go vet ./... | |
- name: Verify go.mod is tidy | |
run: | | |
go mod tidy | |
if ! git diff --quiet go.mod go.sum ; then | |
echo -e "\033[1;31mGo mod files are not tidy. Please run \`go mod tidy\`.\033[0m" | |
false | |
fi | |
- name: Verify generated files are up to date | |
run: | | |
go generate ./... | |
if ! git diff --quiet ; then | |
echo -e "\033[1;31mGenerated files are not up to date. Please run \`go generate ./...\`.\033[0m" | |
false | |
fi |