|
|
@ -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 ./... |
|
|
|