|
4 | 4 | push: |
5 | 5 | tags: ['v*'] |
6 | 6 |
|
7 | | -# Configuration - Edit this section |
8 | | -env: |
9 | | - # Set to 'true' to run tests before building wheels, 'false' to skip tests |
10 | | - RUN_TESTS: 'false' |
| 7 | +jobs: |
| 8 | + # Configuration - Edit this section to enable/disable tests |
| 9 | + config: |
| 10 | + name: Configuration |
| 11 | + runs-on: ubuntu-latest |
| 12 | + outputs: |
| 13 | + run-tests: ${{ steps.config.outputs.run-tests }} |
| 14 | + os-matrix: ${{ steps.config.outputs.os-matrix }} |
| 15 | + python-matrix: ${{ steps.config.outputs.python-matrix }} |
| 16 | + steps: |
| 17 | + - id: config |
| 18 | + run: | |
| 19 | + # Set to 'true' to run tests before building wheels, 'false' to skip tests |
| 20 | + echo "run-tests=false" >> $GITHUB_OUTPUT |
11 | 21 |
|
12 | | - # Test matrix configuration (only used if RUN_TESTS is 'true') |
13 | | - TEST_OS_MATRIX: '["ubuntu-latest", "macos-latest", "windows-latest"]' |
14 | | - TEST_PYTHON_MATRIX: '["3.9", "3.10", "3.11", "3.12"]' |
| 22 | + # Test matrix configuration (only used if run-tests is 'true') |
| 23 | + echo 'os-matrix=["ubuntu-latest", "macos-latest", "windows-latest"]' >> $GITHUB_OUTPUT |
| 24 | + echo 'python-matrix=["3.9", "3.10", "3.11", "3.12"]' >> $GITHUB_OUTPUT |
15 | 25 |
|
16 | | -jobs: |
17 | 26 | test: |
18 | 27 | name: Run Tests |
19 | | - if: env.RUN_TESTS == 'true' |
| 28 | + needs: config |
| 29 | + if: needs.config.outputs.run-tests == 'true' |
20 | 30 | uses: ./.github/workflows/_test.yml |
21 | 31 | with: |
22 | | - os-matrix: ${{ env.TEST_OS_MATRIX }} |
23 | | - python-matrix: ${{ env.TEST_PYTHON_MATRIX }} |
| 32 | + os-matrix: ${{ needs.config.outputs.os-matrix }} |
| 33 | + python-matrix: ${{ needs.config.outputs.python-matrix }} |
24 | 34 | primary-os: "ubuntu-latest" |
25 | 35 | primary-python: "3.11" |
26 | 36 | secrets: inherit |
27 | 37 |
|
28 | 38 | build-wheels: |
29 | 39 | name: Build Wheels (${{ matrix.os }}) |
30 | | - needs: test |
| 40 | + needs: [config, test] |
31 | 41 | if: always() && (needs.test.result == 'success' || needs.test.result == 'skipped') |
32 | 42 | runs-on: ${{ matrix.os }} |
33 | 43 | strategy: |
|
0 commit comments