Add generate job

This commit is contained in:
Joshua Spence
2021-06-24 13:25:42 +10:00
committed by Paul Tyng
parent 693795b5f0
commit 510bd417c2

View File

@@ -27,6 +27,24 @@ jobs:
go-version: "${{ env.GO_VERSION }}" go-version: "${{ env.GO_VERSION }}"
- run: "go build ./..." - run: "go build ./..."
generate:
needs: "build"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/cache@v2"
with:
path: "~/go/pkg/mod"
key: "${{ runner.os }}-gomod-${{ hashFiles('**/go.sum') }}"
restore-keys: |
${{ runner.os }}-gomod-
- uses: "actions/setup-go@v2"
with:
go-version: "${{ env.GO_VERSION }}"
- run: "go generate ./..."
- run: "git diff --compact-summary --exit-code"
lint: lint:
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
steps: steps: