Add support for PI. #104
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: | |
pull_request: | |
push: | |
branches: main | |
defaults: | |
run: | |
shell: bash | |
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 == 'jsirois' | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Noop | |
run: "true" | |
checks: | |
name: TOXENV=${{ matrix.tox-env }} | |
needs: org-check | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
include: | |
- check-name: Lint | |
python-version: 3.9 | |
tox-env: lint | |
- check-name: Types | |
python-version: 3.9 | |
tox-env: check | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Check ${{ matrix.check-name }} | |
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7 | |
with: | |
tox-env: ${{ matrix.tox-env }} | |
unit-tests-legacy: | |
name: (${{ matrix.os }}) TOXENV=py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }} | |
needs: org-check | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- python-version: [2, 7, 18] | |
os: ubuntu-24.04 | |
- python-version: [3, 5, 10] | |
os: ubuntu-24.04 | |
- python-version: [3, 6, 15] | |
os: ubuntu-24.04 | |
- python-version: [3, 7, 17] | |
os: ubuntu-24.04 | |
- python-version: [3, 8, 18] | |
os: ubuntu-24.04 | |
- python-version: [2, 7, 18] | |
os: macos-13 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Python Build Deps | |
if: matrix.os == 'ubuntu-24.04' | |
run: | | |
sudo apt update && | |
sudo apt install -y \ | |
build-essential \ | |
libssl-dev \ | |
zlib1g-dev \ | |
libbz2-dev \ | |
libreadline-dev \ | |
libsqlite3-dev \ | |
curl \ | |
git \ | |
libncursesw5-dev \ | |
xz-utils \ | |
tk-dev \ | |
libxml2-dev \ | |
libxmlsec1-dev \ | |
libffi-dev \ | |
liblzma-dev | |
- name: Setup Python ${{ join(matrix.python-version, '.') }} | |
id: pyenv | |
# Upgrade node16 -> node20: Out for review here: | |
# https://github.com/gabrielfalcao/pyenv-action/pull/444 | |
uses: pex-tool/pyenv-action@baec18679698d2f80064cc04eb9ad0c8dc5ca8f8 | |
with: | |
default: "${{ join(matrix.python-version, '.') }}" | |
- name: Run Unit Tests | |
run: | | |
alias python="${{ steps.pyenv.outputs.pyenv_root }}/versions/${{ join(matrix.python-version, '.') }}/bin/python" | |
python -V | |
pyver="${{ matrix.python-version[0] }}.${{ matrix.python-version[1] }}" | |
if [[ "3.8" == "${pyver}" ]]; then | |
python -mensurepip | |
else | |
curl -fLO https://bootstrap.pypa.io/pip/${pyver}/get-pip.py | |
python get-pip.py | |
rm get-pip.py | |
fi | |
python -mpip install -U pip | |
python -mpip install -U tox | |
python -mtox -epy${{ matrix.python-version[0] }}${{ matrix.python-version[1] }} -- -vvs | |
unit-tests: | |
name: (${{ matrix.os }}) TOXENV=py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }} | |
needs: org-check | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-24.04 | |
python-version: [3, 9] | |
- os: ubuntu-24.04 | |
python-version: [3, 10] | |
- os: ubuntu-24.04 | |
python-version: [3, 11] | |
- os: ubuntu-24.04 | |
python-version: [3, 12] | |
- os: ubuntu-24.04 | |
python-version: [3, 13] | |
- os: ubuntu-24.04 | |
python-version: [3, 14, "0-alpha.1"] | |
- os: macos-13 | |
python-version: [3, 13] | |
- os: macos-13 | |
python-version: [3, 14, "0-alpha.1"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python ${{ join(matrix.python-version, '.') }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ join(matrix.python-version, '.') }}" | |
- name: Setup Tox Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Run Unit Tests | |
run: | | |
python3.11 -V | |
python3.11 -mpip install -U pip | |
python3.11 -mpip install -U tox | |
python3.11 -mtox -epy${{ matrix.python-version[0] }}${{ matrix.python-version[1] }} -- -vvs |