File: typecheck-python.yml

package info (click to toggle)
python-maison 2.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 816 kB
  • sloc: python: 1,549; makefile: 9; sh: 5
file content (53 lines) | stat: -rw-r--r-- 1,318 bytes parent folder | download
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
# .github/workflows/typecheck-python.yml
# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: Type Check Python Code

on:
  pull_request:
    paths:
      - "src/**/*.py"
      - "tests/**/*.py"
      - "noxfile.py"
      - "pyproject.toml"
      - "pyrightconfig.json"
      - ".github/workflows/typecheck-python.yml"
      - "**/*.pyi" # Include explicit type stub files
  push:
    branches:
      - main
      - master
    paths:
      - "src/**/*.py"
      - "tests/**/*.py"
      - "noxfile.py"
      - "pyproject.toml"
      - "pyrightconfig.json"
      - ".github/workflows/typecheck-python.yml"
      - "**/*.pyi"

  workflow_dispatch:

jobs:
  typecheck-python:
    name: Run Python Type Checks on ${{ matrix.os }}/${{ matrix.python-version }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
        os: [ubuntu-latest]

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Set up uv
        uses: astral-sh/setup-uv@v6

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}

      - name: Run Python type checking
        run: uvx nox -s typecheck-${{ matrix.python-version }}