@@ -37,58 +37,32 @@ jobs:
37
37
uses : actions/setup-python@v5
38
38
with :
39
39
python-version : " 3.13"
40
- cache : " pip "
41
- cache-dependency-path : " requirements/dev.txt "
42
- - name : " Install dependencies "
43
- run : |
44
- python -m pip install --upgrade pip
45
- pip install -r requirements/ dev.txt
40
+ - name : " Install uv "
41
+ uses : astral-sh/setup-uv@v6
42
+ with :
43
+ enable-cache : true
44
+ - name : Sync dependencies
45
+ run : uv sync --no-python-downloads --group dev
46
46
- name : " Run codespell"
47
47
run :
48
- codespell --ignore-words-list="groupt,nd,ot,ro,falsy,BU" \
48
+ uv run codespell --ignore-words-list="groupt,nd,ot,ro,falsy,BU" \
49
49
--exclude-file=".github/workflows/codespell.yml"
50
- bandit :
51
- if : ${{ github.event_name != 'schedule' }}
52
- runs-on : ubuntu-latest
53
- steps :
54
- - name : " Checkout Repository"
55
- uses : actions/checkout@v4
56
- - name : " Setup Python"
57
- uses : actions/setup-python@v5
58
- with :
59
- python-version : " 3.13"
60
- cache : " pip"
61
- cache-dependency-path : " requirements/dev.txt"
62
- - name : " Install dependencies"
63
- run : |
64
- python -m pip install --upgrade pip
65
- pip install -r requirements/dev.txt
66
- - name : " Run bandit"
67
- run : bandit --recursive --skip B101,B104,B105,B110,B307,B311,B404,B603,B607 .
68
- pylint :
69
- if : ${{ github.event_name != 'schedule' }}
70
- runs-on : ubuntu-latest
50
+ ruff :
71
51
steps :
72
52
- name : " Checkout Repository"
73
53
uses : actions/checkout@v4
74
54
- name : " Setup Python"
75
55
uses : actions/setup-python@v5
76
56
with :
77
57
python-version : " 3.13"
78
- cache : " pip"
79
- cache-dependency-path : " requirements/dev.txt"
80
- - name : " Install dependencies"
81
- run : |
82
- python -m pip install --upgrade pip
83
- pip install -r requirements/dev.txt
84
- - name : " Setup cache"
85
- id : cache-pylint
86
- uses : actions/cache@v4
58
+ - name : " Install uv"
59
+ uses : astral-sh/setup-uv@v6
87
60
with :
88
- path : .pylint.d
89
- key : pylint
90
- - name : " Run pylint"
91
- run : pylint discord/ --exit-zero
61
+ enable-cache : true
62
+ - name : Sync dependencies
63
+ run : uv sync --no-python-downloads --group dev
64
+ - name : " Run ruff"
65
+ run : uv run ruff check discord/
92
66
mypy :
93
67
if : ${{ github.event_name != 'schedule' }}
94
68
runs-on : ubuntu-latest
@@ -99,12 +73,12 @@ jobs:
99
73
uses : actions/setup-python@v5
100
74
with :
101
75
python-version : " 3.13"
102
- cache : " pip "
103
- cache-dependency-path : " requirements/dev.txt "
104
- - name : " Install dependencies "
105
- run : |
106
- python -m pip install --upgrade pip
107
- pip install -r requirements/ dev.txt
76
+ - name : " Install uv "
77
+ uses : astral-sh/setup-uv@v6
78
+ with :
79
+ enable-cache : true
80
+ - name : Sync dependencies
81
+ run : uv sync --no-python-downloads --group dev
108
82
- name : " Setup cache"
109
83
id : cache-mypy
110
84
uses : actions/cache@v4
@@ -116,43 +90,3 @@ jobs:
116
90
run : mkdir -p -v .mypy_cache
117
91
- name : " Run mypy"
118
92
run : mypy --non-interactive discord/
119
- pytest :
120
- strategy :
121
- matrix :
122
- os : [ubuntu-latest, macos-latest, windows-latest]
123
- python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
124
- exclude :
125
- - { python-version: "3.9", os: "macos-latest" }
126
- include :
127
- - { python-version: "3.9", os: "macos-13" }
128
- runs-on : ${{ matrix.os }}
129
- env :
130
- OS : ${{ matrix.os }}
131
- PYTHON : ${{ matrix.python-version }}
132
- steps :
133
- - name : " Checkout Repository"
134
- uses : actions/checkout@v4
135
- - name : " Setup Python"
136
- uses : actions/setup-python@v5
137
- with :
138
- python-version : ${{ matrix.python-version }}
139
- cache : " pip"
140
- cache-dependency-path : " requirements/dev.txt"
141
- check-latest : true
142
- - name : " Install dependencies"
143
- run : |
144
- python -m pip install --upgrade pip
145
- pip install flake8
146
- pip install -r requirements/dev.txt
147
- - name : " Setup cache"
148
- id : cache-pytest
149
- uses : actions/cache@v4
150
- with :
151
- path : .pytest_cache
152
- key : ${{ matrix.os }}-${{ matrix.python-version }}-pytest
153
- - name : " Lint with flake8"
154
- run : |
155
- # stop the build if there are Python syntax errors or undefined names
156
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
157
- # exit-zero treats all errors as warnings.
158
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics
0 commit comments