@@ -37,58 +37,32 @@ jobs:
3737 uses : actions/setup-python@v5
3838 with :
3939 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
4646 - name : " Run codespell"
4747 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" \
4949 --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 :
7151 steps :
7252 - name : " Checkout Repository"
7353 uses : actions/checkout@v4
7454 - name : " Setup Python"
7555 uses : actions/setup-python@v5
7656 with :
7757 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
8760 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/
9266 mypy :
9367 if : ${{ github.event_name != 'schedule' }}
9468 runs-on : ubuntu-latest
@@ -99,12 +73,12 @@ jobs:
9973 uses : actions/setup-python@v5
10074 with :
10175 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
10882 - name : " Setup cache"
10983 id : cache-mypy
11084 uses : actions/cache@v4
@@ -116,43 +90,3 @@ jobs:
11690 run : mkdir -p -v .mypy_cache
11791 - name : " Run mypy"
11892 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