Skip to content

Upgrade to a release workflow compatible with pypi trusted publishing… #4

Upgrade to a release workflow compatible with pypi trusted publishing…

Upgrade to a release workflow compatible with pypi trusted publishing… #4

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: Test ${{ matrix.py }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
steps:
- uses: actions/checkout@v4
- name: Setup python for tox
uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: python -m pip install tox
- uses: actions/checkout@v4
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- name: Pick environment to test
shell: python
run: |
import codecs; import os; import sys
env = "TOXENV=py{}{}\n".format(*sys.version_info[:2])
print(f"Picked:\n{env}for{sys.version}")
with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler:
file_handler.write(env)
- name: Setup test suite
run: tox -vv --notest
- name: Run test suite
run: tox --skip-pkg-install
static-typing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- run: python -m pip install tox
- name: Run mypy
run: tox -e mypy
lint:
name: Lint
uses: less-action/reusables/.github/workflows/pre-commit.yaml@main
with:
python-version: "3.12"
check-build:
name: Check packaging
uses: less-action/reusables/.github/workflows/python-test-build.yaml@main