Skip to content

Fix cross-drive commonpath on Windows. #3492

Fix cross-drive commonpath on Windows.

Fix cross-drive commonpath on Windows. #3492

Workflow file for this run

name: CI
on: [push, pull_request]
defaults:
run:
shell: bash
env:
_PEX_TEST_DEV_ROOT: ${{ github.workspace }}/.pex_dev
_PEX_TEST_POS_ARGS: "--color --devpi --devpi-timeout 15.0 --shutdown-devpi -vvs"
_PEX_PEXPECT_TIMEOUT: 10
# We have integration tests that exercise `--scie` support and these can trigger downloads from
# GitHub Releases that needed elevated rate limit quota, which this gives.
SCIENCE_AUTH_API_GITHUB_COM_BEARER: ${{ secrets.GITHUB_TOKEN }}
# We fetch Windows script executable stubs when building Pex.
_PEX_FETCH_WINDOWS_STUBS_BEARER: ${{ secrets.GITHUB_TOKEN }}
concurrency:
group: CI-${{ github.ref }}
# Queue on all branches and tags, but only cancel overlapping PR burns.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/tags/') }}
jobs:
setup:
name: Check GitHub Organization
if: github.repository_owner == 'pex-tool'
runs-on: ubuntu-24.04
outputs:
pex_test_posargs: ${{ env._PEX_TEST_POS_ARGS }}
steps:
- name: Noop
if: false
run: |
echo "This is a dummy step that will never run."
windows-tests:
name: "Windows: tox -e ${{ matrix.tox-env }} ${{ matrix.pex-test-pos-args }}"
needs: setup
runs-on: windows-2022
continue-on-error: true
strategy:
matrix:
include:
# N.B.: We use 3.11 to work around issues building typed-ast for the typecheck step.
# There is a Windows wheel for CPython 3.11, but no higher CPython version.
- python-version: [ 3, 13 ]
tox-env: py313-pip25_0-integration
artifact-name: integration-4
cache: true
pex-test-pos-args: -vvsk test_cache_prune -n0 ${{ needs.setup.outputs.pex_test_posargs }} --junit-xml ../dist/test-results/integration-4.xml
steps:
- name: Checkout Pex
uses: actions/checkout@v4
with:
# We need branches and tags for some ITs.
fetch-depth: 0
path: repo
- name: Setup Python ${{ join(matrix.python-version, '.') }}
uses: actions/setup-python@v5
with:
python-version: "${{ join(matrix.python-version, '.') }}"
- name: Restore Cached Devpi Server
if: matrix.cache
id: restore-devpi-server
uses: actions/cache/restore@v4
with:
path: ${{ env._PEX_TEST_DEV_ROOT }}/devpi
# We're using a key suffix / restore-keys prefix trick here to get an updatable cache.
# See: https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
key: windows-2022-${{ runner.arch }}-${{ matrix.tox-env }}-pex-test-dev-root-devpi-v1-${{ github.run_id }}
restore-keys: windows-2022-${{ runner.arch }}-${{ matrix.tox-env }}-pex-test-dev-root-devpi-v1
# Some ITs need this for VCS URLs of the form git+ssh://[email protected]/...
- name: Setup SSH Agent
uses: webfactory/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
if: env.SSH_PRIVATE_KEY != ''
with:
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
- name: Run Tests
uses: pex-tool/actions/run-tox@c53dadd8b410bbd66480de91067e9e45d2b3af38
continue-on-error: true
with:
path: repo/tox.ini
tox-env: >-
${{ matrix.tox-env }} -- ${{ matrix.pex-test-pos-args }}
- uses: actions/upload-artifact@v4
if: always() && matrix.artifact-name
with:
name: test-results-${{ matrix.artifact-name }}
path: |
dist/test-results/
.gitignore
- name: Cache Devpi Server
uses: actions/cache/save@v4
if: matrix.cache && github.ref == 'refs/heads/main'
with:
path: ${{ env._PEX_TEST_DEV_ROOT }}/devpi
key: ${{ steps.restore-devpi-server.outputs.cache-primary-key }}
windows-reports:
name: Consolidate Windows Test Results
needs: windows-tests
if: always()
runs-on: ubuntu-24.04
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- uses: actions/upload-artifact@v4
with:
name: test-results
path: |
dist/test-results/
.gitignore
final-status:
name: Gather Final Status
needs:
- windows-reports
runs-on: ubuntu-24.04
steps:
- name: Check Non-Success
if: |
contains(needs.*.result, 'cancelled') ||
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'skipped')
run: "false"
- name: Success
run: "true"