diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 13902ad65..c981e43b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -58,15 +58,15 @@ jobs: make test-with-cov - name: Upload coverage to Codecov - if: matrix.python == '3.7' - run: | + if: matrix.python == '3.7' && github.repository == 'allenai/allennlp-models' + uses: codecov/codecov-action@v1 + with: + file: ./coverage.xml # Ignore codecov failures as the codecov server is not # very reliable but we don't want to report a failure # in the github UI just because the coverage report failed to # be published. - codecov || echo "codecov upload failed" - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: false pretrained: name: Pretrained Models diff --git a/Makefile b/Makefile index 3bae194f6..ed479011e 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,10 @@ gpu-test : .PHONY : test-with-cov test-with-cov : - pytest --color=yes -rf --cov-config=.coveragerc --cov=allennlp_models/ --durations=40 -m "not pretrained_model_test" + pytest --color=yes -rf --durations=40 -m "not pretrained_model_test" \ + --cov-config=.coveragerc \ + --cov=allennlp_models/ \ + --cov-report=xml .PHONY : test-pretrained test-pretrained :