From 510bd417c2e83af67fac4d36ad9d583207db0f07 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Thu, 24 Jun 2021 13:25:42 +1000 Subject: [PATCH] Add `generate` job --- .github/workflows/ci.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fb6ee77..3e61bb7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,6 +27,24 @@ jobs: go-version: "${{ env.GO_VERSION }}" - 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: runs-on: "ubuntu-latest" steps: