-
-
Notifications
You must be signed in to change notification settings - Fork 464
53 lines (51 loc) · 1.46 KB
/
lint.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
name: Type Check and Lint
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: "requirements/dev.txt"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/dev.txt
- name: Setup cache
id: cache-pylint
uses: actions/cache@v3
with:
path: .pylint.d
key: pylint
- name: Analyse code with pylint
run: |
pylint discord/ --exit-zero
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: "requirements/dev.txt"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/dev.txt
- name: Setup cache
id: cache-mypy
uses: actions/cache@v3
with:
path: .mypy_cache
key: mypy
- name: Make mypy cache directory
run: mkdir -p -v .mypy_cache
- name: Run type checks with Mypy
run: mypy --non-interactive discord/