-
Notifications
You must be signed in to change notification settings - Fork 17
89 lines (83 loc) · 2.87 KB
/
run-tools.yml
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
name: Run tools
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
# Allow triggering manually on other branches.
permissions:
contents: read
pull-requests: read
# This is for non-version-specific checks.
jobs:
run-tools:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'
cache-dependency-path: |
test-requirements.txt
tool-requirements.txt
pyproject.toml
- name: Read project dependencies
run: |
python .github/workflows/read_deps.py
- name: Install dependencies
id: install_deps
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r pyproject-deps.txt -r tool-requirements.txt
mypy --version
- name: Lint with Ruff
run: |
ruff check src/srctools/
# Override regular check, to run all tools even if one fails.
if: (success() || failure()) && steps.install_deps.outcome == 'success'
# Check every version.
- name: MyPy - Python 3.9
run: |
mypy --python-version 3.9 src/srctools/ type_tests/
if: (success() || failure()) && steps.install_deps.outcome == 'success'
- name: MyPy - Python 3.10
run: |
mypy --python-version 3.10 src/srctools/ type_tests/
if: (success() || failure()) && steps.install_deps.outcome == 'success'
- name: MyPy - Python 3.11
run: |
mypy --python-version 3.11 src/srctools/ type_tests/
if: (success() || failure()) && steps.install_deps.outcome == 'success'
- name: MyPy - Python 3.12
run: |
mypy --python-version 3.12 src/srctools/ type_tests/
if: (success() || failure()) && steps.install_deps.outcome == 'success'
- name: MyPy - Python 3.13
run: |
mypy --python-version 3.13 src/srctools/ type_tests/
if: (success() || failure()) && steps.install_deps.outcome == 'success'
- name: Pyright - Python 3.9
run: |
pyright --pythonversion 3.9
if: (success() || failure()) && steps.install_deps.outcome == 'success'
- name: Pyright - Python 3.10
run: |
pyright --pythonversion 3.10
if: (success() || failure()) && steps.install_deps.outcome == 'success'
- name: Pyright - Python 3.11
run: |
pyright --pythonversion 3.11
if: (success() || failure()) && steps.install_deps.outcome == 'success'
- name: Pyright - Python 3.12
run: |
pyright --pythonversion 3.12
if: (success() || failure()) && steps.install_deps.outcome == 'success'
- name: Pyright - Python 3.13
run: |
pyright --pythonversion 3.13
if: (success() || failure()) && steps.install_deps.outcome == 'success'