From a62d74564236ff4936009be868a3d866b34c53ef Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Mon, 22 Apr 2024 16:55:56 +1000 Subject: [PATCH] dont fail ci for codecov --- .../workflows/{{cookiecutter._ci_name}}.yaml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/{{cookiecutter.repo_name}}/.github/workflows/{{cookiecutter._ci_name}}.yaml b/{{cookiecutter.repo_name}}/.github/workflows/{{cookiecutter._ci_name}}.yaml index df806a08..bcea8d0f 100644 --- a/{{cookiecutter.repo_name}}/.github/workflows/{{cookiecutter._ci_name}}.yaml +++ b/{{cookiecutter.repo_name}}/.github/workflows/{{cookiecutter._ci_name}}.yaml @@ -126,13 +126,17 @@ jobs: run: | pytest -n 2 -v --cov={{ cookiecutter.package_name }} --cov-report=xml --color=yes {{ cookiecutter.package_name }}/tests/ - # - name: codecov - # if: github.repository == '{{ cookiecutter.github_host_account }}/{{ cookiecutter.repo_name }}' && github.event_name != 'schedule' - # uses: codecov/codecov-action@v3 - # with: - # file: coverage.xml - # name: codecov-{{ '${{ matrix.os }}' }}-py{{ '${{ matrix.python-version }}' }} - # verbose: True + - name: codecov + if: github.repository == '{{ cookiecutter.github_host_account }}/{{ cookiecutter.repo_name }}' && github.event_name != 'schedule' + uses: codecov/codecov-action@v3 + with: + # codecov can be flaky and result in spurious failures + # the below option will not fail the CI if codecov fails + # change to true to fail the CI if codecov fails + fail_ci_if_error: false + file: coverage.xml + name: codecov-{{ '${{ matrix.os }}' }}-py{{ '${{ matrix.python-version }}' }} + verbose: True pylint_check: