@@ -28,16 +28,21 @@ jobs:
28
28
pip install pytest pytest-cov respx
29
29
pip install -e .
30
30
31
- - name : Test with pytest
31
+ - name : Test with coverage (only on 3.12)
32
+ if : matrix.python-version == '3.12'
32
33
run : |
33
- pytest -xvs tests/ --cov=arcsecond --cov-report=xml
34
- mv .coverage .coverage.${{ matrix.python-version }}
34
+ pytest -xvs tests/ --cov=arcsecond --cov-report=xml:coverage.xml
35
35
36
- - name : Upload coverage artifact
36
+ - name : Test without coverage
37
+ if : matrix.python-version != '3.12'
38
+ run : pytest -xvs tests/
39
+
40
+ - name : Upload coverage artifact (only on 3.12)
41
+ if : matrix.python-version == '3.12'
37
42
uses : actions/upload-artifact@v4
38
43
with :
39
- name : coverage-${{ matrix.python-version }}
40
- path : . coverage.${{ matrix.python-version }}
44
+ name : coverage
45
+ path : coverage.xml
41
46
42
47
scan :
43
48
runs-on : ubuntu-latest
@@ -46,23 +51,11 @@ jobs:
46
51
steps :
47
52
- uses : actions/checkout@v4
48
53
49
- - name : Set up Python
50
- uses : actions/setup-python@v4
51
- with :
52
- python-version : " 3.12"
53
-
54
- - name : Download all coverage artifacts
54
+ - name : Download coverage artifact
55
55
uses : actions/download-artifact@v4
56
56
with :
57
- path : coverages
58
-
59
- - name : Install coverage.py
60
- run : pip install coverage
61
-
62
- - name : Merge coverage files
63
- run : |
64
- coverage combine coverages
65
- coverage xml -o coverage.xml
57
+ name : coverage
58
+ path : .
66
59
67
60
- name : SonarQube Scan
68
61
uses : SonarSource/sonarcloud-github-action@master
0 commit comments