ci: test cache
This commit is contained in:
		
							parent
							
								
									ecea98e912
								
							
						
					
					
						commit
						988a5200f9
					
				|  | @ -22,6 +22,11 @@ jobs: | ||||||
|                   echo "PATH=$PATH:/usr/local/go/bin" >> $GITHUB_ENV |                   echo "PATH=$PATH:/usr/local/go/bin" >> $GITHUB_ENV | ||||||
|             - name: Display Go version |             - name: Display Go version | ||||||
|               run: 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 |             - name: Get go-hashfiles | ||||||
|               uses: https://gitea.com/actions/go-hashfiles@v0.0.1 |               uses: https://gitea.com/actions/go-hashfiles@v0.0.1 | ||||||
|               id: hash-go |               id: hash-go | ||||||
|  | @ -29,10 +34,8 @@ jobs: | ||||||
|                   patterns: |- |                   patterns: |- | ||||||
|                       go.mod |                       go.mod | ||||||
|                       go.sum |                       go.sum | ||||||
| 
 |  | ||||||
|             - name: Echo hash |             - name: Echo hash | ||||||
|               run: echo ${{ steps.hash-go.outputs.hash }} |               run: echo ${{ steps.hash-go.outputs.hash }} | ||||||
| 
 |  | ||||||
|             - name: Cache go |             - name: Cache go | ||||||
|               id: cache-go |               id: cache-go | ||||||
|               uses: https://gitea.com/actions/cache@v3 # Action cache |               uses: https://gitea.com/actions/cache@v3 # Action cache | ||||||
|  | @ -43,11 +46,6 @@ jobs: | ||||||
|                   key: go_cache-${{ steps.hash-go.outputs.hash }} |                   key: go_cache-${{ steps.hash-go.outputs.hash }} | ||||||
|                   restore-keys: |- |                   restore-keys: |- | ||||||
|                       go_cache-${{ steps.hash-go.outputs.hash }} |                       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 |             - name: Build | ||||||
|               run: make build |               run: make build | ||||||
|             - name: Test |             - name: Test | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user