From bd6cfb0b3a754d137faa693995a531294e7c2252 Mon Sep 17 00:00:00 2001 From: joncrall Date: Mon, 20 May 2024 18:20:50 -0400 Subject: [PATCH 1/2] Fix RTD for 2024 services --- .readthedocs.yaml | 5 ++++- docs/readthedocs-reqs.txt | 2 ++ docs/release_notes/pending_release.rst | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 6943b8f..d4bb4da 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,8 +1,11 @@ version: 2 formats: - pdf +build: + os: "ubuntu-22.04" + tools: + python: "3.8" python: - version: 3.8 install: - requirements: docs/readthedocs-reqs.txt - method: pip diff --git a/docs/readthedocs-reqs.txt b/docs/readthedocs-reqs.txt index 4ab96d8..ef7bc2e 100644 --- a/docs/readthedocs-reqs.txt +++ b/docs/readthedocs-reqs.txt @@ -1,3 +1,5 @@ +Sphinx >= 3.5.3 +sphinx-rtd-theme >= 0.5.1 # Additional requirements for building our documentation in RTD sphinx-argparse==0.2.5 sphinx-prompt==1.4.0 diff --git a/docs/release_notes/pending_release.rst b/docs/release_notes/pending_release.rst index dbc9958..f105b27 100644 --- a/docs/release_notes/pending_release.rst +++ b/docs/release_notes/pending_release.rst @@ -6,3 +6,5 @@ Updates / New Features Fixes ----- + +* Fixes for CI and readthedocs From aa8858b286e6050ab2ab0d85f293da35c6628f14 Mon Sep 17 00:00:00 2001 From: joncrall Date: Mon, 20 May 2024 18:33:29 -0400 Subject: [PATCH 2/2] Only use codecov when the token exists --- .github/workflows/ci-unittests.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-unittests.yml b/.github/workflows/ci-unittests.yml index 58460bb..63ac09d 100644 --- a/.github/workflows/ci-unittests.yml +++ b/.github/workflows/ci-unittests.yml @@ -127,9 +127,13 @@ jobs: run: poetry run pytest - name: CodeCov report submission - if: ${{ github.event_name != 'schedule' }} - uses: codecov/codecov-action@v3 + # Only upload coverage if we have the token + env: + HAVE_CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN != '' }} + if: ${{ github.event_name != 'schedule' && env.HAVE_CODECOV_TOKEN == 'true' }} + uses: codecov/codecov-action@v4.0.1 with: fail_ci_if_error: true files: coverage.xml flags: unittests + token: ${{ secrets.CODECOV_TOKEN }}