fix(ci): 禁用失效的缓存服务,设置 GOPROXY=goproxy.cn
This commit is contained in:
@@ -8,6 +8,7 @@ on:
|
||||
|
||||
env:
|
||||
GO_VERSION: '1.26'
|
||||
GOPROXY: 'https://goproxy.cn,direct'
|
||||
GOLANGCI_LINT_VERSION: 'v1.57.2'
|
||||
|
||||
jobs:
|
||||
@@ -22,19 +23,10 @@ jobs:
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
cache: true
|
||||
|
||||
- name: Cache golangci-lint
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /usr/local/bin/golangci-lint
|
||||
key: golangci-lint-${{ env.GOLANGCI_LINT_VERSION }}
|
||||
cache: false
|
||||
|
||||
- name: Install golangci-lint
|
||||
run: |
|
||||
if [ ! -f /usr/local/bin/golangci-lint ]; then
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin ${{ env.GOLANGCI_LINT_VERSION }}
|
||||
fi
|
||||
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/local/bin ${{ env.GOLANGCI_LINT_VERSION }}
|
||||
|
||||
- name: Run golangci-lint
|
||||
run: golangci-lint run --timeout=5m --issues-exit-code=0
|
||||
@@ -50,7 +42,7 @@ jobs:
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
cache: true
|
||||
cache: false
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
@@ -80,7 +72,7 @@ jobs:
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
cache: true
|
||||
cache: false
|
||||
|
||||
- name: Build binary
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user