mirror of
https://github.com/go-kratos/kratos.git
synced 2025-03-17 21:07:54 +02:00
enh(ci): Improve efficiency.
This commit is contained in:
parent
3bf1be993b
commit
65ed153eb0
18
.github/workflows/go.yml
vendored
18
.github/workflows/go.yml
vendored
@ -27,6 +27,17 @@ jobs:
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
# Cache
|
||||
path: ~/go/pkg/mod
|
||||
# Cache key
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
# An ordered list of keys to use for restoring the cache if no cache hit occurred for key
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Get dependencies
|
||||
run: |
|
||||
go get -v -t -d ./...
|
||||
@ -48,8 +59,13 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: go build ./...
|
||||
|
||||
- name: Test
|
||||
run: go test ./...
|
||||
run: go test ./... -coverprofile=coverage.txt -covermode=atomic
|
||||
|
||||
- name: Coverage
|
||||
run: bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
- name: Tool
|
||||
run: |
|
||||
go install ./...
|
||||
|
Loading…
x
Reference in New Issue
Block a user