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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
|
name: Python package
on:
push:
branches:
- "*"
pull_request:
branches:
- master
- development
permissions:
contents: read
jobs:
formatter:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version: [3.12.11]
steps:
- uses: actions/checkout@v5
- name: Format with ruff
uses: astral-sh/ruff-action@v3
with:
version: "0.12.9"
args: "format --check --diff src/pyatmo/ tests/"
linter:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.12.11]
steps:
- uses: actions/checkout@v5
- name: Lint with ruff
uses: astral-sh/ruff-action@v3
with:
version: "0.12.9"
args: "check src/pyatmo tests/"
typechecker:
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
python-version: [3.12.11]
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.6.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip tox-gh-actions
- name: Typecheck with mypy
run: |
tox -e mypy
tests:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
env:
- "3.14"
- "3.13"
- "3.12"
os:
- ubuntu-24.04
suffix:
- ""
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Install tox
run: uv tool install --python-preference only-managed --python 3.13 tox --with .
- name: Install Python
if: startsWith(matrix.env, '3.') && matrix.env != '3.13'
run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: Setup test suite
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.env }}
env:
FORCE_COLOR: "1"
UV_PYTHON_PREFERENCE: "only-managed"
- name: Run test suite
run: tox run --skip-pkg-install -e ${{ matrix.env }}
env:
FORCE_COLOR: "1"
PYTEST_ADDOPTS: "-vv --durations=20"
DIFF_AGAINST: HEAD
UV_PYTHON_PREFERENCE: "only-managed"
|