codeclimate / test-reporter

Code Climate Test Reporter
MIT License
156 stars 76 forks source link

Coverage reports stuck in "started" state #390

Closed antonmarin closed 5 years ago

antonmarin commented 5 years ago

My coverage reports don't match actual repository state. I think that's because of all coverage reports' STATE are "Started". Tried default and not default branches.

image

.travis.yml

---
language: go
go:
  - 1.11.x
env:
  - TZ=UTC
jobs:
  include:
    - stage: test
      install:
        - wget -qO - "https://github.com/go-task/task/releases/download/v2.2.1/task_linux_amd64.tar.gz" |
          tar zxf - -C /tmp task;
          ls -la /tmp/task
        - wget -qO - https://codeclimate.com/downloads/test-reporter/test-reporter-0.6.3-linux-amd64 > /tmp/codeclimate-test-reporter;
          chmod +x /tmp/codeclimate-test-reporter
        - export PATH=$PATH:/tmp
        - task --version
      script:
        - codeclimate-test-reporter before-build
        - task test // go test -race -coverprofile=c.out ./... here
      after_script:
        - codeclimate-test-reporter after-build -t gocov --exit-code $TRAVIS_TEST_RESULT

Log from build

$ codeclimate-test-reporter before-build
The command "codeclimate-test-reporter before-build" exited with 0.
19.94s
$ task test
curl https://raw.githubusercontent.com/golang/dep/v0.5.0/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5110  100  5110    0     0  36451      0 --:--:-- --:--:-- --:--:-- 36500
ARCH = amd64
OS = linux
Will install into /home/travis/gopath/bin
Fetching https://github.com/golang/dep/releases/latest..
Release Tag = v0.5.0
Fetching https://github.com/golang/dep/releases/tag/v0.5.0..
Fetching https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64..
Setting executable permissions.
Moving executable to /home/travis/gopath/bin/dep
dep ensure
dep check
if [ ! -z $(gofmt -e -l **/*.go) ]; then echo "Files with formatting errors:"; gofmt -e -l **/*.go; exit 1; fi
go vet $(go list ./... | grep -v /vendor/)
go test -race -coverprofile=c.out $(go list ./... | grep -v /vendor/)
?       github.com/antonmarin/secret-yaml   [no test files]
?       github.com/antonmarin/secret-yaml/cmd   [no test files]
ok      github.com/antonmarin/secret-yaml/documentManipulator   1.015s  coverage: 42.9% of statements
ok      github.com/antonmarin/secret-yaml/encryption    1.011s  coverage: 76.9% of statements
ok      github.com/antonmarin/secret-yaml/generateRandom    1.018s  coverage: 80.0% of statements
ok      github.com/antonmarin/secret-yaml/io    1.012s  coverage: 83.3% of statements
ok      github.com/antonmarin/secret-yaml/useCases/decrypt  1.017s  coverage: 75.0% of statements
ok      github.com/antonmarin/secret-yaml/useCases/encrypt  1.011s  coverage: 75.0% of statements
ok      github.com/antonmarin/secret-yaml/useCases/generateSecretKey    1.011s  coverage: 100.0% of statements
The command "task test" exited with 0.
after_script
0.67s
$ codeclimate-test-reporter after-build -t gocov --exit-code $TRAVIS_TEST_RESULT
Test report uploaded successfully to Code Climate
Done. Your build exited with 0.
efueger commented 5 years ago

Hi @antonmarin -

Let me know if f you have any questions or run into any issues moving forward. 👍