diff options
author | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-21 14:35:54 -0400 |
---|---|---|
committer | pg9182 <96569817+pg9182@users.noreply.github.com> | 2022-10-21 14:35:54 -0400 |
commit | 69277ebe2c75607d8a67a64f9acc7a49374c307b (patch) | |
tree | 6ca6827279f0a9d27bcd797a5f24dd1babb4c4b4 | |
parent | 9154c4fc592164df65a0f9284df1e0b96d16382f (diff) | |
download | Atlas-69277ebe2c75607d8a67a64f9acc7a49374c307b.tar.gz Atlas-69277ebe2c75607d8a67a64f9acc7a49374c307b.zip |
all: Use GitHub Actions caching
-rw-r--r-- | .github/workflows/ci.yml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index baa4e2e..175b384 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,30 @@ jobs: with: go-version: ${{matrix.go}} + - name: Get Go cache path + id: go-cache + run: | + echo "::set-output name=goos::$(go env GOOS)" + echo "::set-output name=goarch::$(go env GOARCH)" + echo "::set-output name=goversion::$(go env GOVERSION)" + echo "::set-output name=gocache::$(go env GOCACHE)" + echo "::set-output name=gomodcache::$(go env GOMODCACHE)" + + - name: Checkout + uses: actions/checkout@v2 + + - name: Go build cache + uses: actions/cache@v2 + with: + path: ${{steps.go-cache.outputs.gocache}} + key: ${{steps.go-cache.outputs.goversion}}-${{steps.go-cache.outputs.goos}}-${{steps.go-cache.outputs.goarch}}-go-build-${{hashFiles('**/go.sum')}} + + - name: Go mod cache + uses: actions/cache@v2 + with: + path: ${{steps.go-cache.outputs.gomodcache}} + key: ${{steps.go-cache.outputs.goversion}}-${{steps.go-cache.outputs.goos}}-${{steps.go-cache.outputs.goarch}}-go-mod-${{hashFiles('**/go.sum')}} + - name: Go test run: go test -v ./... |