From ae502888469a1ad31b1d3a026cd0c1d9cf265260 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 14 Mar 2023 13:34:10 +0800 Subject: [PATCH 1/2] Support cache on ci --- .gitea/workflows/test.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index bf34338..946a3ca 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -11,6 +11,24 @@ jobs: name: check and test runs-on: ubuntu-latest steps: + - name: cache go path + id: cache-go-path + uses: https://github.com/actions/cache@v3 + with: + path: /go_path + key: go_path-${{ github.repository }}-${{ github.ref_name }} + restore-keys: | + go_path-${{ github.repository }}- + go_path- + - name: cache go cache + id: cache-go-cache + uses: https://github.com/actions/cache@v3 + with: + path: /go_cache + key: go_cache-${{ github.repository }}-${{ github.ref_name }} + restore-keys: | + go_cache-${{ github.repository }}- + go_cache- - uses: actions/setup-go@v3 with: go-version: 1.20 -- 2.40.1 From 3bf5c1066c0e484cedd6ac5b73a2f5faf716795d Mon Sep 17 00:00:00 2001 From: Jason Song Date: Wed, 15 Mar 2023 12:15:21 +0800 Subject: [PATCH 2/2] fix: set GOPATH & GOCACHE --- .gitea/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 946a3ca..372f61a 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -5,6 +5,8 @@ on: env: GOPROXY: https://goproxy.io,direct + GOPATH: /go_path + GOCACHE: /go_cache jobs: lint: -- 2.40.1