Skip to content

Commit 8eb1aa6

Browse files
committed
ci: test packages first offline then online
1 parent aedd7f4 commit 8eb1aa6

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

Jenkinsfile

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,15 @@ def windows_wheels(pythonVersions, testPackages, params, wheelStashes){
176176
retry(3){
177177
timeout(60){
178178
try{
179-
def attempt = 0
180179
bat """python -m venv venv
181180
venv\\Scripts\\pip install --disable-pip-version-check uv
182181
venv\\Scripts\\uv python install ${pythonVersion.replace('+gil','')}
183182
"""
183+
def attempt = 0
184184
retry(2){
185185
attempt += 1
186186
withEnv([(attempt == 1) ? "UV_OFFLINE=1" : 'UV_OFFLINE=0']){
187-
bat(label: 'Running Tox',
187+
bat(label: "Running Tox: ${(attempt == 1) ? 'Offline' : 'Online'}",
188188
script: "venv\\Scripts\\uv run --only-group=tox-uv --python ${pythonVersion} tox run -e py${pythonVersion.replace('.', '').replace('+gil', '')} --installpkg ${it.path}"
189189
)
190190
}
@@ -614,11 +614,17 @@ def get_sdist_windows(params, pythonVersions){
614614
findFiles(glob: 'dist/*.tar.gz').each{
615615
timeout(60){
616616
try{
617-
bat(label: 'Running Tox',
618-
script: """uv run --only-group=tox-uv --frozen tox run --runner=uv-venv-runner --installpkg ${it.path} -e py${pythonVersion.replace('.', '').replace('+gil', '')} -vv
619-
rmdir /S /Q %TOX_WORK_DIR%
620-
"""
621-
)
617+
def attempt = 0
618+
retry(2){
619+
attempt += 1
620+
withEnv([(attempt == 1) ? "UV_OFFLINE=1" : 'UV_OFFLINE=0']){
621+
bat(label: "Running Tox: ${(attempt == 1) ? 'Offline' : 'Online'}",
622+
script: """uv run --only-group=tox-uv --frozen tox run --runner=uv-venv-runner --installpkg ${it.path} -e py${pythonVersion.replace('.', '').replace('+gil', '')} -vv
623+
rmdir /S /Q %TOX_WORK_DIR%
624+
"""
625+
)
626+
}
627+
}
622628
} finally{
623629
cleanWs(
624630
patterns: [

0 commit comments

Comments
 (0)