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 9
9
branches : [main]
10
10
11
11
jobs :
12
- test :
12
+ run-tests-and-coverage :
13
13
runs-on : ubuntu-22.04
14
14
strategy :
15
15
fail-fast : false
27
27
run : poetry build && poetry run twine check dist/*.tar.gz
28
28
- name : Run tests
29
29
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
30
38
- name : Run doctests
31
39
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}
27
27
${TESTS} : % /tests :
28
28
poetry run pytest -v --cov=testcontainers.$* $* /tests
29
29
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
+
30
37
# Target to lint the code.
31
38
lint :
32
39
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
+
1
8
# Testcontainers Python
2
9
3
10
` 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"
159
159
line-length = 120
160
160
161
161
[tool .pytest .ini_options ]
162
- addopts = " --cov-report=term --cov-report=html -- tb=short --strict-markers"
162
+ addopts = " --tb=short --strict-markers"
163
163
log_cli = true
164
164
log_cli_level = " INFO"
165
165
You can’t perform that action at this time.
0 commit comments