Skip to content

Commit 0a78231

Browse files
Abel Milashclaude
andcommitted
Run tests before wheel install so coverage tracks src/ not site-packages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2998a8e commit 0a78231

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

.azdo/ci-pr.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,6 @@ extends:
5757
flake8 . --count --exit-zero --show-source --statistics
5858
displayName: 'Lint with flake8'
5959
60-
- script: |
61-
python -m build
62-
displayName: 'Build package'
63-
64-
- script: |
65-
python -m pip install dist/*.whl
66-
displayName: 'Install wheel'
67-
6860
- script: |
6961
pytest --junitxml=test-results.xml --cov=PowerPlatform --cov-report=xml --cov-report=term-missing --cov-fail-under=90
7062
displayName: 'Test with pytest'
@@ -74,6 +66,14 @@ extends:
7466
diff-cover coverage.xml --compare-branch=origin/main --fail-under=90
7567
displayName: 'Diff coverage (90% for new changes)'
7668
69+
- script: |
70+
python -m build
71+
displayName: 'Build package'
72+
73+
- script: |
74+
python -m pip install dist/*.whl
75+
displayName: 'Install wheel'
76+
7777
- task: PublishTestResults@2
7878
condition: succeededOrFailed()
7979
inputs:

.github/workflows/python-package.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,6 @@ jobs:
4141
# exit-zero treats all errors as warnings, matching Agents-for-python approach
4242
flake8 . --count --exit-zero --show-source --statistics
4343
44-
- name: Build package
45-
run: |
46-
python -m build
47-
48-
- name: Install wheel
49-
run: |
50-
python -m pip install dist/*.whl
51-
5244
- name: Test with pytest
5345
run: |
5446
pytest --junitxml=test-results.xml --cov=PowerPlatform --cov-report=xml --cov-report=term-missing --cov-fail-under=90
@@ -58,6 +50,14 @@ jobs:
5850
git fetch origin ${{ github.base_ref }}
5951
diff-cover coverage.xml --compare-branch=origin/${{ github.base_ref }} --fail-under=90
6052
53+
- name: Build package
54+
run: |
55+
python -m build
56+
57+
- name: Install wheel
58+
run: |
59+
python -m pip install dist/*.whl
60+
6161
- name: Upload test results
6262
if: always()
6363
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)