File tree Expand file tree Collapse file tree 4 files changed +45
-2
lines changed Expand file tree Collapse file tree 4 files changed +45
-2
lines changed Original file line number Diff line number Diff line change 99 branches : [main]
1010
1111jobs :
12- test :
12+ run-tests-and-coverage :
1313 runs-on : ubuntu-22.04
1414 strategy :
1515 fail-fast : false
2727 run : poetry build && poetry run twine check dist/*.tar.gz
2828 - name : Run tests
2929 run : make core/tests
30+ - name : Rename coverage file
31+ run : mv .coverage .coverage.${{ matrix.python-version}}
32+ - name : " Save coverage artifact"
33+ uses : actions/upload-artifact@v4
34+ with :
35+ name : " coverage-artifact-${{ matrix.python-version}}"
36+ path : " .coverage.*"
37+ retention-days : 1
3038 - name : Run doctests
3139 run : make core/doctests
40+
41+ coverage-compile :
42+ needs : " run-tests-and-coverage"
43+ runs-on : ubuntu-22.04
44+ steps :
45+ - uses : actions/checkout@v4
46+ - name : Set up Python
47+ uses : ./.github/actions/setup-env
48+ - name : Install Python dependencies
49+ run : poetry install --all-extras
50+ - name : " Download coverage artifacts"
51+ uses : actions/download-artifact@v4
52+ with :
53+ pattern : " coverage-artifact-*"
54+ merge-multiple : true
55+ - name : Compile coverage
56+ run : make coverage
57+ - name : Upload coverage to Codecov
58+ uses : codecov/codecov-action@v4
59+ with :
60+ token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ tests : ${TESTS}
2727${TESTS} : % /tests :
2828 poetry run pytest -v --cov=testcontainers.$* $* /tests
2929
30+ # Target to combine and report coverage.
31+ coverage :
32+ poetry run coverage combine
33+ poetry run coverage report
34+ poetry run coverage xml
35+ poetry run coverage html
36+
3037# Target to lint the code.
3138lint :
3239 pre-commit run -a
Original file line number Diff line number Diff line change 1+ [ ![ Ruff] ( https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json )] ( https://github.com/astral-sh/ruff )
2+ [ ![ image] ( https://img.shields.io/pypi/v/testcontainers.svg )] ( https://pypi.python.org/pypi/testcontainers )
3+ [ ![ image] ( https://img.shields.io/pypi/l/testcontainers.svg )] ( https://github.com/testcontainers/testcontainers-python/blob/main/LICENSE )
4+ [ ![ image] ( https://img.shields.io/pypi/pyversions/testcontainers.svg )] ( https://pypi.python.org/pypi/testcontainers )
5+ [ ![ codecov] ( https://codecov.io/gh/testcontainers/testcontainers-python/branch/master/graph/badge.svg )] ( https://codecov.io/gh/testcontainers/testcontainers-python )
6+
7+
18# Testcontainers Python
29
310` testcontainers-python ` facilitates the use of Docker containers for functional and integration testing.
Original file line number Diff line number Diff line change @@ -159,7 +159,7 @@ priority = "primary"
159159line-length = 120
160160
161161[tool .pytest .ini_options ]
162- addopts = " --cov-report=term --cov-report=html -- tb=short --strict-markers"
162+ addopts = " --tb=short --strict-markers"
163163log_cli = true
164164log_cli_level = " INFO"
165165
You can’t perform that action at this time.
0 commit comments