mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 20:26:19 +08:00
Update ci.yml
upgrade actions/setup-go@v4 to support cache by default
This commit is contained in:
parent
6e9ba588f9
commit
5817b08c43
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
@ -18,23 +18,10 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.goVer }}
|
||||
|
||||
- name: Setup Environment
|
||||
run: |
|
||||
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
|
||||
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Module cache
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: go-mod-cache
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }}
|
||||
|
||||
|
||||
- name: Test with Coverage
|
||||
run: go test -coverpkg=./... -v -short -coverprofile=coverage1.txt -covermode=atomic ./...
|
||||
env:
|
||||
@ -48,4 +35,4 @@ jobs:
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: ./coverage1.txt,./coverage2.txt
|
||||
files: ./coverage1.txt,./coverage2.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user