-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (89 loc) · 2.6 KB
/
linting.yaml
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
108
109
110
111
112
113
114
name: Linting
env:
POETRY_VERSION: "1.8.4"
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- main
permissions:
contents: read
jobs:
# see https://docs.astral.sh/uv/guides/integration/github/
run-tests:
name: Python linters
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
# - name: Set up Python
# run: uv python install
# - name: "Set up Python"
# uses: actions/setup-python@v5
# with:
# python-version-file: ".python-version"
# - name: "Set up Python"
# uses: actions/setup-python@v5
# with:
# python-version-file: "pyproject.toml"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Ruff check
run: uv run ruff check .
- name: Flake8 check
run: uv run flake8 .
- name: Pylint
run: uv run pylint
- name: Pyroma
run: uv run pyroma
# jobs:
# run-tests:
# name: Python linters
# runs-on: ubuntu-latest
# timeout-minutes: 5
# steps:
# - uses: actions/checkout@v3
# with:
# persist-credentials: false
# fetch-depth: 0
# - name: Set up Python 3.12
# uses: actions/setup-python@v4
# with:
# python-version: "3.12"
# - name: Set up Poetry
# run: |
# pip install poetry==${{ env.POETRY_VERSION }}
# - name: Install
# run: |
# just install
# - name: Flake8
# run: |
# just flake8
# - name: Ruff
# run: |
# just ruff-check
# - name: Pylint
# run: |
# just pylint
# - name: Mypy
# run: |
# just mypy
# - name: Pyroma
# run: |
# just pyroma
# - name: Check poetry
# run: |
# just poetry-check
# just poetry-lock-check