Skip to content

Commit

Permalink
Fail CI if codecov upload fails (#51)
Browse files Browse the repository at this point in the history
Let the CI job fail if the codecov upload fails. Otherwise it could stop
and we wouldn't know.
  • Loading branch information
leouieda authored May 3, 2023
1 parent 438597e commit 1a3abdd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ jobs:
run: coverage xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
env_vars: OS,PYTHON,DEPENDENCIES
# Don't mark the job as failed if the upload fails for some reason.
# It does sometimes but shouldn't be the reason for running
# everything again unless something else is broken.
fail_ci_if_error: false
# Fail the job so we know coverage isn't being updated. Otherwise it
# can silently drop and we won't know.
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion ensaio/tests/test_fetchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_data_source_from_github(use_github):
"Check that GitHub is used as a data source when the env variable is set"
backup = None
try:
backup = os.environ.get("ENSAIO_DATA_FROM_GITHUB", None)
backup = os.environ.get("ENSAIO_DATA_FROM_GITHUB")
os.environ["ENSAIO_DATA_FROM_GITHUB"] = use_github
repo = _fetchers._repository(fname="alps-gps-velocity.csv.xz", version=1)
if use_github == "True":
Expand Down

0 comments on commit 1a3abdd

Please sign in to comment.