From 20efd90bf5ee0ff0652302064b58f6ceed208858 Mon Sep 17 00:00:00 2001 From: Scott Olesen Date: Wed, 13 Aug 2025 17:50:23 -0400 Subject: [PATCH] Separate tests and badge update --- .github/workflows/run_qaqc.yaml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_qaqc.yaml b/.github/workflows/run_qaqc.yaml index d8b2cea..4bf0ccc 100644 --- a/.github/workflows/run_qaqc.yaml +++ b/.github/workflows/run_qaqc.yaml @@ -6,8 +6,8 @@ on: branches: [main] jobs: - TestAndCoverageBadgeUpdate: - name: Test and Coverage Badge Update + tests: + name: pytest runs-on: ubuntu-latest steps: @@ -19,7 +19,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: "3.10" - name: Install poetry run: | @@ -29,6 +29,19 @@ jobs: run: | poetry install --no-root --with dev poetry run pytest + badge: + # only run on pushes to main + if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} + + name: update coverage badge + runs-on: ubuntu-latest + + # requires the pytest job above + needs: tests + + steps: + - name: Build badge + run: | poetry run coverage-badge -f -o docs/assets/badges/coverage.svg echo '' >> docs/assets/badges/coverage.svg