Skip to content

Commit

Permalink
additional workflow job to combine coverage data + upload report
Browse files Browse the repository at this point in the history
  • Loading branch information
ADBond committed Dec 23, 2024
1 parent 460d1ce commit d6c810e
Showing 1 changed file with 43 additions and 3 deletions.
46 changes: 43 additions & 3 deletions .github/workflows/test-clickhouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,51 @@ jobs:
- name: Run tests
run: |
uv run pytest -vm ${{ matrix.test-set }} --cov=splinkclickhouse --cov-branch tests
mv .coverage .coverage_${{ matrix.test-set }}
mv .coverage .coverage.${{ matrix.test-set }}
- uses: actions/upload-artifact@v4
with:
name: coverage_${{ matrix.test-set }}
path: .coverage_${{ matrix.test-set }}
path: .coverage.${{ matrix.test-set }}
if-no-files-found: error


combine-and-upload-coverage:
runs-on: ubuntu-latest
needs: test
name: Combine coverage data and upload to Codecov
steps:
- uses: actions/checkout@v4

- name: Setup uv
id: setup-uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: Install Python 3.10
run: uv python install 3.10

- name: Install dependencies
run: uv sync -p 3.10

- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: './coverage'
pattern: 'coverage_*'
merge-multiple: true

- name: Check directory content
run: ls -alhR ./coverage

- name: Combine coverage data and create report
run: |
uv run coverage combine ./coverage
uv run coverage xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit d6c810e

Please sign in to comment.