enh(ci): Improve efficiency.

pull/634/head
Psnail 4 years ago committed by GitHub
parent 3bf1be993b
commit 65ed153eb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 18
      .github/workflows/go.yml

@ -27,6 +27,17 @@ jobs:
- name: Check out code into the Go module directory - name: Check out code into the Go module directory
uses: actions/checkout@v2 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 - name: Get dependencies
run: | run: |
go get -v -t -d ./... go get -v -t -d ./...
@ -48,8 +59,13 @@ jobs:
- name: Build - name: Build
run: go build ./... run: go build ./...
- name: Test - 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 - name: Tool
run: | run: |
go install ./... go install ./...

Loading…
Cancel
Save