@@ -4,21 +4,34 @@ name: PyPI Tests
44on :
55 workflow_call :
66 inputs :
7+ install-flags :
8+ description : ' '
9+ type : string
10+ required : false
11+ default : ' '
12+ download-name :
13+ description : ' '
14+ type : string
15+ required : false
16+ default : ' '
717
8- concurrency :
9- group : ${{ github.workflow}}-${{ github.head_ref }}
10- cancel-in-progress : true
18+ # concurrency:
19+ # group: ${{ github.workflow}}-${{ github.head_ref }}
20+ # cancel-in-progress: true
1121
1222jobs :
1323 #
1424 # Run all tests on Linux using standard PyPI packages, including minimum requirements
1525 #
1626 PyPITests :
1727 name : ${{ matrix.python-version }} ${{ matrix.dep-versions }} ${{ matrix.no-extras }}
18- runs-on : ubuntu-latest
28+ runs-on : ${{ matrix.platform }}
29+ env :
30+ INSTALL_FLAGS : ${{ inputs.install-flags }}
1931 strategy :
2032 fail-fast : false
2133 matrix :
34+ platform : ["ubuntu-latest", "macos-latest", "macos-15-intel", "windows-latest", "windows-11-arm"]
2235 python-version : [3.11, 3.12, 3.13, 3.14]
2336 dep-versions : [Latest]
2437 no-extras : ['']
@@ -40,27 +53,15 @@ jobs:
4053 fetch-tags : true
4154 persist-credentials : false
4255
43- - name : Generate minimum dependencies
44- if : ${{ matrix.dep-versions == 'Minimum' }}
45- run : |
46- pip install tomli
47- python << EOF
48- import tomli as tomllib
49- from pathlib import Path
50-
51- # Read our pyproject.toml
52- config = tomllib.load(open('pyproject.toml', 'rb'))['project']
53- opt_deps = config['optional-dependencies']
56+ - name : Download artifacts if specified
57+ if : ${{ inputs.download-name != '' }}
58+ uses : actions/download-artifact@v8
59+ with :
60+ name : ${{ inputs.download-name }}
5461
55- # Generate a Minimum dependency file
56- for src, fname in [(config['dependencies'], 'ci/requirements.txt'),
57- (opt_deps['test'], 'ci-dev/test_requirements.txt'),
58- (opt_deps['extras'], 'ci/extra_requirements.txt')]:
59- with Path(fname).open('wt') as out:
60- for dep in src:
61- dep = dep.split(';')[0]
62- out.write(dep.replace('>=', '==') + '\n')
63- EOF
62+ - name : Set flag to install minimum dependencies
63+ if : ${{ matrix.dep-versions == 'Minimum' }}
64+ run : echo "INSTALL_FLAGS=${{ env.INSTALL_FLAGS }} --resolution=lowest-direct" >> $GITHUB_ENV
6465
6566 - name : Install from PyPI
6667 uses : ./.github/actions/install-pypi
7071 python-version : ${{ matrix.python-version }}
7172 old-build : ${{ matrix.no-extras != 'No Extras' && matrix.dep-versions == 'Minimum' }}
7273 need-cartopy : ${{ matrix.no-extras != 'No Extras' }}
74+ install-flags : ${{ env.INSTALL_FLAGS }}
7375
7476 - name : Run tests
7577 uses : ./.github/actions/run-tests
0 commit comments