|
|
@ -7,6 +7,7 @@ on: |
|
|
|
- "**/*.go" |
|
|
|
- "**/*.go" |
|
|
|
pull_request: |
|
|
|
pull_request: |
|
|
|
branches: [master] |
|
|
|
branches: [master] |
|
|
|
|
|
|
|
types: [opened, synchronize, reopened] |
|
|
|
paths: |
|
|
|
paths: |
|
|
|
- "**/*.go" |
|
|
|
- "**/*.go" |
|
|
|
|
|
|
|
|
|
|
@ -22,12 +23,15 @@ jobs: |
|
|
|
with: |
|
|
|
with: |
|
|
|
go-version: ^1.14 |
|
|
|
go-version: ^1.14 |
|
|
|
|
|
|
|
|
|
|
|
- name: Checkout default branch |
|
|
|
- name: Checkout codebase |
|
|
|
uses: actions/checkout@v2 |
|
|
|
uses: actions/checkout@v2 |
|
|
|
|
|
|
|
|
|
|
|
- name: Get dependencies |
|
|
|
- name: Cache go module |
|
|
|
run: | |
|
|
|
uses: actions/cache@v2 |
|
|
|
go get -v -t -d ./... |
|
|
|
with: |
|
|
|
|
|
|
|
path: ~/go/pkg/mod |
|
|
|
|
|
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} |
|
|
|
|
|
|
|
restore-keys: ${{ runner.os }}-go- |
|
|
|
|
|
|
|
|
|
|
|
- name: Test |
|
|
|
- name: Test |
|
|
|
run: go test -parallel 1 -timeout 6h -v ./... |
|
|
|
run: go test -timeout 1h -v ./... |
|
|
|