|
5 | 5 | pull_request: |
6 | 6 | branches: main |
7 | 7 | jobs: |
| 8 | + generate_python_matrix: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + outputs: |
| 11 | + python_versions: ${{ steps.set-matrix.outputs.python_versions }} |
| 12 | + min_python_version: ${{ steps.set-matrix.outputs.min_python_version }} |
| 13 | + steps: |
| 14 | + - name: Checkout STUMPY |
| 15 | + uses: actions/checkout@v4 |
| 16 | + with: |
| 17 | + repository: stumpy-dev/stumpy |
| 18 | + - name: Upgrade Pip, Install Minimum Requirements |
| 19 | + run: | |
| 20 | + python -m pip install --upgrade pip pandas lxml packaging |
| 21 | + shell: bash |
| 22 | + - name: Generate Python versions |
| 23 | + id: set-matrix |
| 24 | + run: | |
| 25 | + MIN_PYTHON=$(python ./versions.py -mode min | grep python | awk '{print $2}') |
| 26 | + MAX_PYTHON=$(python ./versions.py -mode max | grep python | awk '{print $2}') |
| 27 | + echo "python_versions=$(python ./versions.py -mode range $MIN_PYTHON $MAX_PYTHON)" >> $GITHUB_OUTPUT |
| 28 | + echo "min_python_version=$($MIN_PYTHON)" >> $GITHUB_OUTPUT |
| 29 | + shell: bash |
8 | 30 | minimum-version-testing: |
| 31 | + needs: generate_python_matrix: |
9 | 32 | runs-on: ${{ matrix.os }} |
10 | 33 | strategy: |
11 | 34 | matrix: |
12 | 35 | os: [ubuntu-latest, macos-latest, windows-latest] |
13 | | - python-version: ['3.10'] |
| 36 | + python-version: ${{ fromJSON(needs.generate_python_matrix.outputs.min_python_version) }} |
14 | 37 | steps: |
15 | 38 | - uses: actions/checkout@v4 |
16 | 39 | - name: Set Up Python |
@@ -59,11 +82,12 @@ jobs: |
59 | 82 | run: ./test.sh unit |
60 | 83 | shell: bash |
61 | 84 | unit-testing: |
| 85 | + needs: generate_python_matrix |
62 | 86 | runs-on: ${{ matrix.os }} |
63 | 87 | strategy: |
64 | 88 | matrix: |
65 | 89 | os: [ubuntu-latest, macos-latest, windows-latest] |
66 | | - python-version: ['3.10', '3.11', '3.12', '3.13'] |
| 90 | + python-version: ${{ fromJSON(needs.generate_python_matrix.outputs.python_versions) }} |
67 | 91 | steps: |
68 | 92 | - uses: actions/checkout@v4 |
69 | 93 | - name: Set Up Python |
@@ -106,11 +130,12 @@ jobs: |
106 | 130 | run: ./test.sh unit |
107 | 131 | shell: bash |
108 | 132 | coverage-testing: |
| 133 | + needs: generate_python_matrix |
109 | 134 | runs-on: ${{ matrix.os }} |
110 | 135 | strategy: |
111 | 136 | matrix: |
112 | 137 | os: [ubuntu-latest, macos-latest, windows-latest] |
113 | | - python-version: ['3.10', '3.11', '3.12', '3.13'] |
| 138 | + python-version: ${{ fromJSON(needs.generate_python_matrix.outputs.python_versions) }} |
114 | 139 | steps: |
115 | 140 | - uses: actions/checkout@v4 |
116 | 141 | - name: Set Up Python |
|
0 commit comments