-
Notifications
You must be signed in to change notification settings - Fork 4
87 lines (82 loc) · 2.28 KB
/
Copy pathlinting.yml
File metadata and controls
87 lines (82 loc) · 2.28 KB
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
# Linting, formatting, type checks
name: Linting
on:
push:
branches:
- master
- release
tags:
- "*"
pull_request: { }
jobs:
linting:
runs-on: ubuntu-latest
name: Linting
steps:
- uses: actions/checkout@v7
with:
submodules: 'recursive'
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with ruff
run: ruff check --output-format=github .
code-formatting:
runs-on: ubuntu-latest
name: Code Format
steps:
- uses: actions/checkout@v7
with:
submodules: 'recursive'
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
- name: Check with ruff
run: ruff format --check .
typechecks:
runs-on: ubuntu-latest
name: Type Checks
strategy:
fail-fast: false
matrix:
python-version: [ "3.11", "3.12", "3.13", "3.14" ]
steps:
- uses: actions/checkout@v7
with:
submodules: 'recursive'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
- name: Run type checks
run: |
mypy --config-file pyproject.toml --junit-xml mypy-${{ matrix.python-version }}.xml .
- name: Upload Unit Test Results
if: always()
uses: actions/upload-artifact@v7
with:
name: MyPy Test Results (Python ${{ matrix.python-version }})
path: mypy-${{ matrix.python-version }}.xml
test-event-file:
name: "Publish Test Results Event File"
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v7
with:
name: Event File
path: ${{ github.event_path }}