|
61 | 61 | echo "use_pixi=false" >> $GITHUB_OUTPUT |
62 | 62 | fi |
63 | 63 |
|
64 | | - # Job 3: Test Suite - UV Workflow |
| 64 | + # Job 3.1: Test Suite - UV Workflow |
65 | 65 | # Traditional Python testing with uv for projects without pixi |
66 | 66 | test-uv: |
67 | 67 | needs: detect-test-strategy |
|
99 | 99 | run: | |
100 | 100 | pytest -v || if [ $? -eq 5 ]; then exit 0; else exit $?; fi |
101 | 101 |
|
102 | | - # Job 4: Test Suite - Pixi Workflow |
| 102 | + # Job 3.2: Test Suite - Pixi Workflow |
103 | 103 | # Pixi-based testing for projects using pixi.toml |
104 | 104 | test-pixi: |
105 | 105 | needs: detect-test-strategy |
@@ -136,7 +136,28 @@ jobs: |
136 | 136 | run: | |
137 | 137 | pixi run -e ${{ matrix.environment }} test || if [ $? -eq 5 ]; then exit 0; else exit $?; fi |
138 | 138 |
|
139 | | - # Job 5: Build Verification |
| 139 | + # Job 3.3: Test Suite - Complete |
| 140 | + # Unified test status for branch protection |
| 141 | + test: |
| 142 | + if: always() |
| 143 | + needs: [detect-test-strategy, test-uv, test-pixi] |
| 144 | + runs-on: ubuntu-latest |
| 145 | + steps: |
| 146 | + - name: Check test results |
| 147 | + run: | |
| 148 | + uv_result="${{ needs.test-uv.result }}" |
| 149 | + pixi_result="${{ needs.test-pixi.result }}" |
| 150 | + # One should succeed, the other should be skipped |
| 151 | + if [ "$uv_result" == "success" ] || [ "$uv_result" == "skipped" ]; then |
| 152 | + if [ "$pixi_result" == "success" ] || [ "$pixi_result" == "skipped" ]; then |
| 153 | + echo "All tests passed!" |
| 154 | + exit 0 |
| 155 | + fi |
| 156 | + fi |
| 157 | + echo "Tests failed: uv=$uv_result, pixi=$pixi_result" |
| 158 | + exit 1 |
| 159 | +
|
| 160 | + # Job 4: Build Verification |
140 | 161 | # Ensures the package can be built successfully |
141 | 162 | build: |
142 | 163 | runs-on: ubuntu-latest |
@@ -172,5 +193,5 @@ jobs: |
172 | 193 | # This ensures the package is usable after installation |
173 | 194 | run: ap --help |
174 | 195 |
|
175 | | - # Job 6: Type Check |
| 196 | + # Job 5: Type Check |
176 | 197 | # typecheck: |
0 commit comments