File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 6
6
branches :
7
7
- " main"
8
8
9
+ env :
10
+ PYTHON_VERSION : 3.11
11
+
9
12
jobs :
10
13
test :
11
14
name : Run tests & display coverage
@@ -20,11 +23,26 @@ jobs:
20
23
contents : write
21
24
steps :
22
25
- uses : actions/checkout@v4
26
+ with :
27
+ fetch-depth : 1
23
28
24
- - name : Install everything, run the tests, produce the .coverage file
29
+ - name : Install Poetry
25
30
run : |
26
- run coverage run -m pytest
27
- run coverage xml
31
+ pipx install poetry
32
+ poetry config virtualenvs.path ~/.virtualenvs${{ env.PYTHON_VERSION }}
33
+
34
+ - name : Set up Python ${{ env.PYTHON_VERSION }}
35
+ uses : actions/setup-python@v3
36
+ with :
37
+ python-version : ${{ env.PYTHON_VERSION }}
38
+ cache : " poetry"
39
+
40
+ - name : Install dependencies
41
+ run : |
42
+ poetry install -E minify
43
+
44
+ - name : Produce the .coverage file
45
+ run : poetry run coverage run -m pytest
28
46
29
47
- name : Coverage comment
30
48
id : coverage_comment
Original file line number Diff line number Diff line change @@ -174,6 +174,10 @@ disable_error_code = ["empty-body"]
174
174
module = " decorator"
175
175
ignore_missing_imports = true
176
176
177
+ [tool .coverage .run ]
178
+ branch = true
179
+ relative_files = true
180
+
177
181
[build-system ]
178
182
requires = [" poetry-core>=1.0.0" ]
179
183
build-backend = " poetry.core.masonry.api"
You can’t perform that action at this time.
0 commit comments