diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 68c4c40b..005317ed 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -4,64 +4,70 @@ jobs: build: name: Build runs-on: ubuntu-latest - timeout-minutes: 5 + timeout-minutes: 10 steps: - + - name: setup directory shell: bash run: | mkdir -p "${{ github.workspace }}/testdatapath" - + # set GOPATH - name: setup env shell: bash run: | echo "${{ github.workspace }}/go/bin:" >> $GITHUB_PATH echo "GOPATH=${{ github.workspace }}/go" >> $GITHUB_ENV - + - name: Install Go if: success() uses: actions/setup-go@v1 with: go-version: 1.13 id: go - + - name: checkout uses: actions/checkout@v2 with: fetch-depth: 1 path: go/src/github.com/${{ github.repository }} - + - name: Get dependencies run: | cd $GOPATH/src/github.com/${{ github.repository }} go get -v -d ./... - + - name: Build shell: bash run: | cd $GOPATH/src/github.com/${{ github.repository }}/cmd/utreexoserver go build -v - + - name: Build shell: bash run: | cd $GOPATH/src/github.com/${{ github.repository }}/cmd/utreexoclient go build -v - + - name: Run unit tests shell: bash run: | cd $GOPATH/src/github.com/${{ github.repository }} - go test -v ./accumulator - + go test -v ./accumulator -race -covermode atomic -coverprofile=covprofile + + - name: Send coverage + uses: shogo82148/actions-goveralls@v1 + with: + path-to-profile: "covprofile" + working-directory: "${{ github.workspace }}/go/src/github.com/${{ github.repository }}" + - name: Run integration tests shell: bash run: | cd $GOPATH/src/github.com/${{ github.repository }} ./test/install_bitcoind.sh ./test/csn_bridge.sh "./cmd/utreexoserver/utreexoserver" "./cmd/utreexoclient/utreexoclient" "${{ github.workspace }}/testdatapath" - + - name: Upload testdata uses: actions/upload-artifact@v2 with: @@ -74,13 +80,14 @@ jobs: needs: Build timeout-minutes: 5 steps: + # set GOPATH - name: setup env shell: bash run: | echo "${{ github.workspace }}/go/bin:" >> $GITHUB_PATH echo "GOPATH=${{ github.workspace }}/go" >> $GITHUB_ENV - + - uses: actions/download-artifact@v2 with: name: testdatapath @@ -108,7 +115,7 @@ jobs: run: | cd $GOPATH/src/github.com/${{ github.repository }}/cmd/utreexoserver go install -v - + - name: checkout uses: actions/checkout@v2 with: