CI: no fuzzy match in RCE #111
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: tox | |
on: | |
push: | |
paths-ignore: | |
- .github/appveyor.yml | |
# tags: | |
# - '*' | |
pull_request: | |
# on pull, automatic | |
workflow_dispatch: | |
# allow manual trigger | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
env: | |
# note that some tools care only for the name, not the value | |
FORCE_COLOR: 1 | |
jobs: | |
tox: | |
name: ${{ matrix.os }} / ${{ matrix.python-version }} | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes | |
timeout-minutes: 10 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# All OSes pass except Windows because tests need Unix-only fcntl, grp, pwd, etc. | |
os: [ubuntu-latest, macos-latest] | |
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.10" ] | |
unsupported: [false] | |
mindep: [false] | |
include: | |
- os: ubuntu-20.04 | |
python-version: "3.8" | |
mindep: true | |
unsupported: false | |
- os: ubuntu-latest | |
python-version: "3.13" | |
unsupported: true | |
mindep: false | |
- os: windows-latest | |
python-version: "3.12" | |
unsupported: true | |
mindep: false | |
exclude: | |
# skip some dupes on slower platform | |
- os: macos-latest | |
python-version: "3.8" | |
- os: macos-latest | |
python-version: "3.9" | |
- os: macos-latest | |
python-version: "3.11" | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Using Python ${{ matrix.python-version }} | |
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | |
id: "setup-python" | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: ${{ matrix.unsupported }} | |
cache: pip | |
cache-dependency-path: pyproject.toml | |
- name: "Install test Dependencies (cache hit: ${{ steps.setup-python.outputs.cache-hit }})" | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox | |
- run: tox -e run-module | |
timeout-minutes: 2 | |
continue-on-error: ${{ matrix.unsupported }} | |
- run: tox -e run-entrypoint | |
timeout-minutes: 2 | |
continue-on-error: ${{ matrix.unsupported }} | |
- run: tox -e py | |
timeout-minutes: 5 | |
continue-on-error: ${{ matrix.unsupported }} | |
- if: ${{ matrix.mindep }} | |
timeout-minutes: 8 | |
run: tox -e mindep | |
continue-on-error: ${{ matrix.unsupported }} | |
- name: Install dist Dependencies | |
run: | | |
python -m pip install build | |
- name: make dist | |
run: | | |
# only source tarball: | |
# (cd source/ && python -m build --sdist) | |
# all: | |
python -m build | |
# mac does not like the --parent --verbose long forms | |
mkdir -p upload | |
# windows does not like the {.a,.b} shorthands | |
# windows doe not do --archive --verbose on cp | |
cp dist/*.tar.gz upload/ | |
cp dist/*.whl upload/ | |
- uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 | |
with: | |
path: | | |
upload/*.tar.gz | |
upload/*.whl | |
name: dist-${{ matrix.os }}-${{ matrix.python-version }} | |
retention-days: 5 | |
# sdist.tar.gz and bdist.whl are compressed by default | |
compression-level: 0 | |
if-no-files-found: error |