This commit is contained in:
@@ -9,6 +9,8 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
go-test:
|
go-test:
|
||||||
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /cache/tools
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -19,6 +21,28 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: "1.26.x"
|
go-version: "1.26.x"
|
||||||
|
|
||||||
|
- name: Get go-hashfiles
|
||||||
|
uses: https://gitea.com/actions/go-hashfiles@v0.0.1
|
||||||
|
id: hash-go
|
||||||
|
with:
|
||||||
|
patterns: |-
|
||||||
|
go.mod
|
||||||
|
go.sum
|
||||||
|
|
||||||
|
- name: Echo hash
|
||||||
|
run: echo ${{ steps.hash-go.outputs.hash }}
|
||||||
|
|
||||||
|
- name: Cache go
|
||||||
|
id: cache-go
|
||||||
|
uses: https://github.com/actions/cache@v3 # Action cache
|
||||||
|
with: # specify with your GOMODCACHE and GOCACHE
|
||||||
|
path: |-
|
||||||
|
/root/go/pkg/mod
|
||||||
|
/root/.cache/go-build
|
||||||
|
key: go_cache-${{ steps.hash-go.outputs.hash }}
|
||||||
|
restore-keys: |-
|
||||||
|
go_cache-${{ steps.hash-go.outputs.hash }}
|
||||||
|
|
||||||
- name: Check Formatting
|
- name: Check Formatting
|
||||||
run: |
|
run: |
|
||||||
gofmt -l .
|
gofmt -l .
|
||||||
|
|||||||
Reference in New Issue
Block a user