Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 32 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
push:
branches: [ main ]

permissions:
contents: read

jobs:
ci:
name: CI
Expand All @@ -23,9 +26,35 @@ jobs:
- run: make typecheck
- name: Start ClickHouse
run: docker compose up --detach --wait clickhouse
- run: make test
- name: Check Coverage
uses: 5monkeys/cobertura-action@v14
- run: make test opts='--cov-fail-under=100'
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage-report
path: coverage.xml

coverage:
name: Coverage report
needs: ci
# Only for PRs from this repository: fork PRs get a read-only token. Runs no PR code.
if: ${{ !cancelled() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
permissions:
pull-requests: write # Post the coverage report comment on the PR
checks: write # 5monkeys/cobertura-action also creates a check run
steps:
- name: Download coverage report
id: download
# No report if the test job failed before running pytest; skip reporting then.
continue-on-error: true
Comment thread
khvn26 marked this conversation as resolved.
Resolved
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: coverage-report

- name: Report Coverage
if: steps.download.outcome == 'success'
uses: 5monkeys/cobertura-action@ee5787cc56634acddedc51f21c7947985531e6eb # v14
with:
minimum_coverage: 100
fail_below_threshold: true
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- '*'

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand Down
Loading