-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.27 KB
/
python-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
---
name: Python Lint
env:
PIP_DEFAULT_TIMEOUT: 100
on: [pull_request, push] # yamllint disable-line
jobs:
python-linting:
name: Python Linting
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Python 3.8
uses: actions/setup-python@v4
with:
python-version: "3.8"
architecture: x64
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-linting
restore-keys: ${{ runner.os }}-linting
- name: Install Black and Codespell
run: pip install black codespell
- name: Run Black
run: black --check .
- name: Run CodeSpell
run: codespell --quiet-level=2 --skip=".git" --skip=".kitchen" -L wisper,anull
markdown-linting:
name: Markdown Linting
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Run Markdown Lint
uses: docker://avtodev/markdown-lint:v1
with:
args: "**/*.md"