From 988a5200f94cce684431046e11de75f6f6a3f484 Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Thu, 19 Sep 2024 18:58:05 -0400 Subject: [PATCH] ci: test cache --- .gitea/workflows/test.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 419ed5d..e11666f 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -22,6 +22,11 @@ jobs: echo "PATH=$PATH:/usr/local/go/bin" >> $GITHUB_ENV - name: Display Go version run: go version + - name: Prepare + run: | + go env -w GO111MODULE=on + go env -w GOPROXY=https://goproxy.io,direct + chown -R root:root /root/.ssh - name: Get go-hashfiles uses: https://gitea.com/actions/go-hashfiles@v0.0.1 id: hash-go @@ -29,10 +34,8 @@ jobs: patterns: |- go.mod go.sum - - name: Echo hash run: echo ${{ steps.hash-go.outputs.hash }} - - name: Cache go id: cache-go uses: https://gitea.com/actions/cache@v3 # Action cache @@ -43,11 +46,6 @@ jobs: key: go_cache-${{ steps.hash-go.outputs.hash }} restore-keys: |- go_cache-${{ steps.hash-go.outputs.hash }} - - name: Prepare - run: | - go env -w GO111MODULE=on - go env -w GOPROXY=https://goproxy.io,direct - chown -R root:root /root/.ssh - name: Build run: make build - name: Test