generated from seyLu/python-template
-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.28 KB
/
lint.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
name: Lint
run-name: Linting ${{ github.repository }}
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
name: Perform lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- name: Harden Runner
uses: step-security/harden-runner@398bb08048482c421b1da00a58a1b472a306eb85 # v2.5.0
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.0
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install and upgrade PIP
run: python -m pip install --upgrade pip
- name: Install Dependencies
run: >
pip install
ruff
black
mypy
- name: Ruff Linter
run: ruff check . --diff
- name: Black Formatter
run: black . --diff --check
- name: Mypy Type Checker
run: >
mypy .
--install-types
--non-interactive
--check-untyped-defs
--ignore-missing-imports