| 1 | name: go test |
| 2 | |
| 3 | on: [push, pull_request] |
| 4 | |
| 5 | jobs: |
| 6 | tests: |
| 7 | runs-on: ubuntu-latest |
| 8 | steps: |
| 9 | - uses: actions/checkout@master |
| 10 | - uses: actions/setup-go@v2 |
| 11 | with: |
| 12 | go-version: '1.14' |
| 13 | - name: Run Coverage |
| 14 | run: go test -v -covermode=count -coverprofile=profile.cov ./... |
| 15 | - name: Send coverage report to coveralls |
| 16 | uses: shogo82148/actions-goveralls@v1 |
| 17 | with: |
| 18 | path-to-profile: profile.cov |
| 19 | |
| 20 | build: |
| 21 | runs-on: ubuntu-latest |
| 22 | steps: |
| 23 | |
| 24 | - name: Set up Go 1.4 |
| 25 | uses: actions/setup-go@v2 |
| 26 | with: |
| 27 | go-version: '1.14' |
| 28 | id: go |
| 29 | |
| 30 | - name: Check out code into the Go module directory |
| 31 | uses: actions/checkout@v2 |
| 32 | |
| 33 | - name: Get dependencies |
| 34 | run: | |
| 35 | go get -v -t -d ./... |
| 36 | if [ -f Gopkg.toml ]; then |
| 37 | curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh |
| 38 | dep ensure |
| 39 | fi |
| 40 | |
| 41 | - name: Build |
| 42 | run: go build -v . |
| 43 | |
| 44 | - name: RecursiveTest |
| 45 | run: go test ./... |