Skip to content

Commit d63cb64

Browse files
committed
Update CI add py3.11
instead of omitting tests folder exclude pass lines in coverage. upload coverage once.
1 parent c2537f0 commit d63cb64

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
python-version: ["3.7", "3.8", "3.9", "3.10"]
12-
poetry-version: ["1.1.15", "1.2.0"]
11+
python-version: ["3.11", "3.10", "3.9", "3.8", "3.7"]
12+
poetry-version: ["1.2.0", "1.1.15"]
1313
steps:
1414
- uses: actions/checkout@v3
1515
- name: Set up Python ${{ matrix.python-version }}
@@ -26,11 +26,13 @@ jobs:
2626
run: poetry install
2727
- name: Run tests
2828
run: coverage run -m unittest
29-
- name: Report coverage
29+
- if: ${{ strategy.job-index == 0 }}
30+
name: Report coverage
3031
run: |
3132
coverage report
3233
coverage xml
33-
- name: Upload coverage to Codecov
34+
- if: ${{ strategy.job-index == 0 }}
35+
name: Upload coverage to Codecov
3436
uses: codecov/codecov-action@v3
3537
with:
3638
files: ./coverage.xml

pyproject.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,6 @@ coverage = {extras = ["toml"], version = "^6.4.4"}
2525
requires = ["poetry-core>=1.0.0"]
2626
build-backend = "poetry.core.masonry.api"
2727

28-
[tool.coverage.run]
29-
omit = [
30-
"tests*"
31-
]
32-
3328
[tool.coverage.report]
3429
exclude_lines = [
3530
# Have to re-enable the standard pragma
@@ -43,10 +38,12 @@ exclude_lines = [
4338

4439
# Don't complain if non-runnable code isn't run:
4540
"if __name__ == .__main__.:",
41+
"pass",
4642

4743
# Don't complain about abstract methods, they aren't run:
4844
"@(abc.)?abstractmethod",
4945
]
46+
5047
ignore_errors = true
5148

5249
[tool.coverage.html]

0 commit comments

Comments
 (0)