Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better test coverage reports #3498

Merged
merged 14 commits into from
Sep 5, 2024
14 changes: 14 additions & 0 deletions .coveragerc36
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This is the coverage.py config for Python 3.6
# The config for newer Python versions is in pyproject.toml.

[run]
branch = true
omit =
/tmp/*
*/tests/*
*/.venv/*


[report]
exclude_lines =
"if TYPE_CHECKING:",
24 changes: 18 additions & 6 deletions .github/workflows/test-integrations-ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down Expand Up @@ -127,11 +133,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-huggingface_hub"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/test-integrations-aws-lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-aws_lambda"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/test-integrations-cloud-computing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-gcp-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down Expand Up @@ -119,11 +125,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-gcp"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/test-integrations-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-common"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/test-integrations-data-processing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-spark-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down Expand Up @@ -155,11 +161,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-spark"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/test-integrations-databases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-sqlalchemy-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down Expand Up @@ -173,11 +179,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-sqlalchemy"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/test-integrations-graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-strawberry-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down Expand Up @@ -119,11 +125,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-strawberry"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/test-integrations-miscellaneous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-trytond-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down Expand Up @@ -127,11 +133,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-trytond"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/test-integrations-networking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-requests-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down Expand Up @@ -119,11 +125,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-requests"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/test-integrations-web-frameworks-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-fastapi-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down Expand Up @@ -155,11 +161,17 @@ jobs:
run: |
set -x # print commands that are executed
./scripts/runtox.sh --exclude-latest "py${{ matrix.python-version }}-fastapi"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() }}
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage*
coverage xml -i
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@v4.5.0
Expand Down
Loading
Loading