1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
name: main
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_call:
concurrency:
group: main-${{ github.ref }}
cancel-in-progress: false
jobs:
test:
strategy:
matrix:
os: [ubuntu-24.04, macos-14, windows-2022]
python: ["3.9", "3.13"]
toxenv: ["py"]
exclude:
- os: ubuntu-24.04
python: "3.13"
toxenv: py
include:
- os: ubuntu-24.04
python: "3.13"
toxenv: cover
- os: ubuntu-24.04
python: "3.13"
toxenv: light
- os: ubuntu-24.04
python: "3.13"
toxenv: lint
- os: ubuntu-24.04
python: "3.13"
toxenv: mypy
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Configure Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Run tox
run: uvx --with tox-uv tox -e ${{ matrix.toxenv }}
- name: Upload test results
if: ${{ !cancelled() && matrix.toxenv != 'lint' && matrix.toxenv != 'mypy' }}
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.toxenv }}
path: |
reports/*.xml
- name: Publish coverage
uses: coverallsapp/github-action@v2
if: ${{ !cancelled() && matrix.toxenv == 'cover' }}
event-file:
runs-on: ubuntu-24.04
steps:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: event_file
path: ${{ github.event_path }}
|