Skip to content

Commit

Permalink
ci: add go caching (#3091)
Browse files Browse the repository at this point in the history
`actions/setup-go` requires `actions/checkout` to read the `go.sum`
file.

![CleanShot 2024-11-08 at 11 55
28@2x](https://github.com/user-attachments/assets/9014b6f4-d415-487a-a624-d5879e69d2c2)

Signed-off-by: moul <[email protected]>
  • Loading branch information
moul authored Nov 8, 2024
1 parent 7ef606c commit d73b6c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
generated:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}

- name: Checkout code
uses: actions/checkout@v4

- name: Check generated files are up to date
working-directory: ${{ inputs.modulepath }}
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/lint_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
working-directory: ${{ inputs.modulepath }}
args:
--config=${{ github.workspace }}/.github/golangci.yml
version: v1.59 # sync with misc/devdeps
version: v1.59 # sync with misc/devdeps
4 changes: 2 additions & 2 deletions .github/workflows/test_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Go test
working-directory: ${{ inputs.modulepath }}
env:
Expand Down

0 comments on commit d73b6c6

Please sign in to comment.