@@ -51,18 +51,18 @@ jobs:
5151 - name : Checkout Code
5252 uses : actions/checkout@v6
5353
54- - name : Set up Python 3.11
54+ - name : Set up Python 3.10
5555 uses : actions/setup-python@v6
5656 with :
57- python-version : ' 3.11 '
57+ python-version : ' 3.10 '
5858
5959 - name : Cache pip Dependencies
6060 uses : actions/cache@v5
6161 with :
6262 path : ~/.cache/pip
63- key : ${{ runner.os }}-lint-pip-${{ hashFiles('**/pyproject.toml') }}
63+ key : ${{ runner.os }}-lint-pip-3.10- ${{ hashFiles('**/pyproject.toml') }}
6464 restore-keys : |
65- ${{ runner.os }}-lint-pip-
65+ ${{ runner.os }}-lint-pip-3.10-
6666
6767 - name : Install Linters and Type Checker
6868 run : |
8787 fail-fast : false
8888 matrix :
8989 os : [ubuntu-latest, macos-latest, windows-latest]
90- python-version : [3.9, '3.10', '3.11', '3.12', '3.13']
90+ python-version : ['3.10', '3.11', '3.12', '3.13']
9191
9292 runs-on : ${{ matrix.os }}
9393
@@ -112,7 +112,7 @@ jobs:
112112 - name : Install Dependencies
113113 run : |
114114 python -m pip install --upgrade pip
115- pip install -e .[dev]
115+ pip install -e " .[dev,full]"
116116
117117 - name : Run Tests with Coverage
118118 shell : bash
@@ -121,9 +121,8 @@ jobs:
121121 --cov-report=term-missing --cov-branch --junitxml=test-results.xml
122122
123123 - name : Coverage report with threshold
124- if : runner.os == 'Linux' && matrix.python-version == '3.12'
125124 run : |
126- coverage report --fail-under=80 --skip-covered --show-missing
125+ coverage report --fail-under=80
127126
128127 - name : Upload coverage reports to Codecov
129128 if : runner.os == 'Linux' && matrix.python-version == '3.12'
@@ -136,7 +135,7 @@ jobs:
136135 verbose : true
137136
138137 - name : Upload coverage for SonarCloud
139- uses : actions/upload-artifact@v6
138+ uses : actions/upload-artifact@v4
140139 if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
141140 with :
142141 name : coverage-report
@@ -154,7 +153,7 @@ jobs:
154153 strategy :
155154 fail-fast : false
156155 matrix :
157- python-version : [pypy-3.9 , pypy-3.10 ]
156+ python-version : [pypy-3.10 , pypy-3.11 ]
158157
159158 steps :
160159 - name : Checkout Code
@@ -177,11 +176,10 @@ jobs:
177176 run : |
178177 python -m pip install --upgrade pip
179178 pip install -e .
180- pip install pytest pytest-cov
179+ pip install pytest
181180
182181 - name : Run Tests
183- run : |
184- pytest -v
182+ run : pytest -v
185183
186184 # ============================================================================
187185 # Mutation Testing (test effectiveness validation)
@@ -210,9 +208,8 @@ jobs:
210208
211209 - name : Run mutation testing
212210 run : |
213- mutmut run . || true
211+ mutmut run || true
214212 mutmut results || true
215- continue-on-error : true
216213
217214 # ============================================================================
218215 # Complexity & Maintainability Metrics
@@ -297,51 +294,3 @@ jobs:
297294
298295 - name : Check import contracts
299296 run : lint-imports
300- continue-on-error : true
301-
302- # ============================================================================
303- # SonarCloud Quality Gate
304- # Evidence: Complexity/duplication metrics correlate with defect density
305- # ============================================================================
306- sonarcloud :
307- name : SonarCloud Analysis
308- runs-on : ubuntu-latest
309- needs : test
310- if : github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
311-
312- steps :
313- - uses : actions/checkout@v6
314- with :
315- fetch-depth : 0
316-
317- - name : Download coverage reports
318- uses : actions/download-artifact@v7
319- with :
320- name : coverage-report
321- path : .
322-
323- - name : Verify coverage files exist
324- run : |
325- echo "=== Checking for coverage files ==="
326- ls -lh coverage.xml test-results.xml || true
327- echo "=== Coverage.xml source paths ==="
328- head -10 coverage.xml || true
329-
330- - name : Create sonar-project.properties
331- run : |
332- cat > sonar-project.properties <<EOF
333- sonar.projectKey=nikolay-e_treemapper
334- sonar.organization=nikolay-e
335- sonar.sources=src/treemapper
336- sonar.tests=tests
337- sonar.python.coverage.reportPaths=coverage.xml
338- sonar.python.xunit.reportPath=test-results.xml
339- sonar.python.version=3.9,3.10,3.11,3.12,3.13
340- EOF
341-
342- - name : SonarCloud Scan
343- uses : SonarSource/sonarcloud-github-action@ba3875ecf642b2129de2b589510c81a8b53dbf4e # master
344- env :
345- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
346- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
347- continue-on-error : true
0 commit comments