Updating package metadata to report a wider range of Python version s… #1
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: check | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: check-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: test ${{ matrix.py }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- Ubuntu | |
- MacOs | |
py: | |
- 3.11 | |
- 3.10 | |
- 3.9 | |
- 3.8 | |
steps: | |
- name: Setup Python for tox | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- uses: actions/checkout@v4 | |
- name: Install tox and dev dependencies | |
run: python -m pip install -r dev-requirements.txt | |
- name: Setup Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
micromamba-version: "latest" | |
- name: Pick environment to run | |
run: | | |
import subprocess; import json; import os | |
major, minor, impl = json.loads(subprocess.check_output(["python", "-c", "import json; import sys; import platform; print(json.dumps([sys.version_info[0], sys.version_info[1], platform.python_implementation()]));"], universal_newlines=True)) | |
with open(os.environ['GITHUB_ENV'], 'a') as file_handler: | |
file_handler.write('TOXENV=' + ("py" if impl == "CPython" else "pypy") + ("{}{}".format(major, minor) if impl == "CPython" else "3") + "\n") | |
shell: python | |
- name: Setup test suite | |
run: tox -vv --notest | |
- name: Run test suite | |
run: tox --skip-pkg-install | |
env: | |
CI_RUN: "yes" | |
DIFF_AGAINST: HEAD |