More pyenv git fiddle. #2053
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |
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: | |
org-check: | |
name: Check GitHub Organization | |
if: github.repository_owner == 'pex-tool' | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Noop | |
run: "true" | |
mac-tests: | |
name: tox -e ${{ matrix.tox-env }} ${{ matrix.pex-test-pos-args }} | |
needs: org-check | |
runs-on: macos-13 | |
strategy: | |
matrix: | |
include: | |
- python-version: [ 3, 12 ] | |
tox-env: py312-pip24_2-integration | |
tox-env-python: python3.11 | |
pex-test-pos-args: -k test_pex_multi_resolve | |
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: Expose Pythons | |
uses: pantsbuild/actions/expose-pythons@e63d2d0e3c339bdffbe5e51e7c39550e3bc527bb | |
- name: Restore Cached Pyenv Interpreters | |
id: restore-pyenv-interpreters | |
uses: actions/cache/restore@v4 | |
with: | |
path: ${{ env._PEX_TEST_DEV_ROOT }}/pyenv | |
key: macos-13-${{ runner.arch }}-pex-test-dev-root-pyenv-v1 | |
- name: Restore Cached Devpi Server | |
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: macos-13-${{ runner.arch }}-${{ matrix.tox-env }}-pex-test-dev-root-devpi-v1-${{ github.run_id }} | |
restore-keys: macos-13-${{ 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: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7 | |
with: | |
path: repo/tox.ini | |
python: ${{ matrix.tox-env-python }} | |
tox-env: >- | |
${{ matrix.tox-env }} -- ${{ env._PEX_TEST_POS_ARGS }} ${{ matrix.pex-test-pos-args }} | |
- name: Cache Pyenv Interpreters | |
uses: actions/cache/save@v4 | |
if: github.ref == 'refs/heads/main' | |
with: | |
path: ${{ env._PEX_TEST_DEV_ROOT }}/pyenv | |
key: ${{ steps.restore-pyenv-interpreters.outputs.cache-primary-key }} | |
- name: Cache Devpi Server | |
uses: actions/cache/save@v4 | |
if: github.ref == 'refs/heads/main' | |
with: | |
path: ${{ env._PEX_TEST_DEV_ROOT }}/devpi | |
key: ${{ steps.restore-devpi-server.outputs.cache-primary-key }} | |
final-status: | |
name: Gather Final Status | |
needs: | |
- mac-tests | |
runs-on: ubuntu-22.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" |