@@ -22,19 +22,6 @@ concurrency:
2222permissions :
2323 contents : read
2424
25- env :
26- # Environment variable to support color support (jaraco/skeleton#66)
27- FORCE_COLOR : 1
28-
29- # Suppress noisy pip warnings
30- PIP_DISABLE_PIP_VERSION_CHECK : ' true'
31- PIP_NO_WARN_SCRIPT_LOCATION : ' true'
32-
33- # Ensure tests can sense settings about the environment
34- TOX_OVERRIDE : >-
35- testenv.pass_env+=GITHUB_*,FORCE_COLOR
36-
37-
3825jobs :
3926 test :
4027 strategy :
@@ -66,86 +53,14 @@ jobs:
6653 - platform : ubuntu-latest
6754 python : " 3.10"
6855 distutils : stdlib
69- runs-on : ${{ matrix.platform }}
70- continue-on-error : ${{ matrix.python == '3.15' || matrix.python == 'pypy3.11' }}
71- # XXX: pypy seems to be flaky with unrelated tests in #6345
72- env :
73- SETUPTOOLS_USE_DISTUTILS : ${{ matrix.distutils || 'local' }}
74- timeout-minutes : 75
75- steps :
76- - uses : actions/checkout@v4
77- - name : Install build dependencies
78- # Install dependencies for building packages on pre-release Pythons
79- # jaraco/skeleton#161
80- if : matrix.python == '3.15' && matrix.platform == 'ubuntu-latest'
81- run : |
82- sudo apt update
83- sudo apt install -y libxml2-dev libxslt-dev
84- - name : Setup Python
85- id : python-install
86- uses : actions/setup-python@v5
87- with :
88- python-version : ${{ matrix.python }}
89- allow-prereleases : true
90- # Workaround for actions/setup-python#981 on macos
91- # Workaround for https://github.com/pypa/setuptools/issues/5143 on windows
92- # (env var only modified for this specific step)
93- env :
94- SETUPTOOLS_USE_DISTUTILS : >-
95- ${{
96- (
97- ( matrix.platform == 'macos-latest' || matrix.platform == 'windows-latest' )
98- && matrix.python == '3.9'
99- && 'stdlib'
100- )
101- || matrix.distutils
102- || 'local'
103- }}
104- - uses : actions/cache@v4
105- id : cache
106- with :
107- path : setuptools/tests/config/downloads/*.cfg
108- key : >-
109- ${{ hashFiles('setuptools/tests/config/setupcfg_examples.txt') }}-
110- ${{ hashFiles('setuptools/tests/config/downloads/*.py') }}
111- - name : Populate download cache
112- if : steps.cache.outputs.cache-hit != 'true'
113- working-directory : setuptools/tests/config
114- run : python -m downloads.preload setupcfg_examples.txt
115- - name : Adjust env vars
116- shell : bash
117- run : |
118- echo 'PIPX_DEFAULT_PYTHON=${{ steps.python-install.outputs.python-path }}' >> $GITHUB_ENV
119- - name : Pre-build distributions for test
120- shell : bash
121- run : |
122- rm -rf dist
123- # workaround for pypa/setuptools#4333
124- pipx run --pip-args 'pyproject-hooks!=1.1' build
125- echo "PRE_BUILT_SETUPTOOLS_SDIST=$(ls dist/*.tar.gz)" >> $GITHUB_ENV
126- echo "PRE_BUILT_SETUPTOOLS_WHEEL=$(ls dist/*.whl)" >> $GITHUB_ENV
127- rm -rf setuptools.egg-info # Avoid interfering with the other tests
128- - name : Workaround for unreleased PyNaCl (pyca/pynacl#805)
129- if : contains(matrix.python, 'pypy')
130- run : echo "SETUPTOOLS_ENFORCE_DEPRECATION=0" >> $GITHUB_ENV
131- - name : Install tox
132- run : python -m pip install tox
133- - name : Run
134- run : tox
135- - name : Create coverage report
136- if : hashFiles('.coverage') != '' # Rudimentary `file.exists()`
137- run : pipx run coverage xml --ignore-errors
138- - name : Publish coverage
139- if : hashFiles('coverage.xml') != '' # Rudimentary `file.exists()`
140- uses : codecov/codecov-action@v4
141- with :
142- flags : >- # Mark which lines are covered by which envs
143- CI-GHA,
144- ${{ github.job }},
145- OS-${{ runner.os }},
146- VM-${{ matrix.platform }},
147- Py-${{ steps.python-install.outputs.python-version }}
148- token : ${{ secrets.CODECOV_TOKEN }}
56+ uses : ./.github/workflows/test-suite.yml
57+ with :
58+ job : ${{ github.job }}
59+ python : ${{ matrix.python }}
60+ platform : ${{ matrix.platform }}
61+ distutils : ${{ matrix.distutils }}
62+ full-test : true
63+ secrets : inherit
14964
15065 collateral :
15166 strategy :
@@ -154,19 +69,10 @@ jobs:
15469 job :
15570 - diffcov
15671 - docs
157- runs-on : ubuntu-latest
158- steps :
159- - uses : actions/checkout@v4
160- with :
161- fetch-depth : 0
162- - name : Setup Python
163- uses : actions/setup-python@v5
164- with :
165- python-version : 3.x
166- - name : Install tox
167- run : python -m pip install tox
168- - name : Eval ${{ matrix.job }}
169- run : tox -e ${{ matrix.job }}
72+ uses : ./.github/workflows/test-suite.yml
73+ with :
74+ platform : ubuntu-latest
75+ tox-env : ${{ matrix.job }}
17076
17177 check : # This job does nothing and is only used for the branch protection
17278 if : always()
@@ -196,6 +102,14 @@ jobs:
196102 - windows-latest
197103 runs-on : ${{ matrix.platform }}
198104 timeout-minutes : 75
105+ # Decoupled from the reusable test-suite.yml (Cygwin needs its own shell);
106+ # env vars shared with that workflow are duplicated here deliberately.
107+ env :
108+ FORCE_COLOR : 1
109+ PIP_DISABLE_PIP_VERSION_CHECK : ' true'
110+ PIP_NO_WARN_SCRIPT_LOCATION : ' true'
111+ TOX_OVERRIDE : >-
112+ testenv.pass_env+=GITHUB_*,FORCE_COLOR
199113 steps :
200114 - uses : actions/checkout@v4
201115 - name : Install Cygwin with Python
@@ -270,12 +184,12 @@ jobs:
270184 if : steps.changed-files-specific-distutils.outputs.any_changed == 'true'
271185 run : |
272186 echo "One or more files in the setuptools/_distutils folder has changed." | tee "${GITHUB_STEP_SUMMARY}"
273- exit 1
187+ exit 1
274188 - name : Fail the job if any file(s) in the _vendor folder change
275189 if : steps.changed-files-specific-vendor.outputs.any_changed == 'true'
276190 run : |
277191 echo "One or more files in the setuptools/_vendor folder has changed." | tee "${GITHUB_STEP_SUMMARY}"
278- exit 1
192+ exit 1
279193
280194 integration-test :
281195 needs : test
@@ -289,6 +203,14 @@ jobs:
289203 # With that in mind, the integration tests can run for a single setup
290204 runs-on : ubuntu-latest
291205 timeout-minutes : 75
206+ # Decoupled from the reusable test-suite.yml; env vars shared with that
207+ # workflow are duplicated here deliberately.
208+ env :
209+ FORCE_COLOR : 1
210+ PIP_DISABLE_PIP_VERSION_CHECK : ' true'
211+ PIP_NO_WARN_SCRIPT_LOCATION : ' true'
212+ TOX_OVERRIDE : >-
213+ testenv.pass_env+=GITHUB_*,FORCE_COLOR
292214 steps :
293215 - uses : actions/checkout@v4
294216 - name : Install OS-level dependencies
0 commit comments