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