-
Notifications
You must be signed in to change notification settings - Fork 42
41 lines (35 loc) · 1008 Bytes
/
linting.yml
File metadata and controls
41 lines (35 loc) · 1008 Bytes
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
name: Linting and MyPy (Pelican)
on:
push:
paths:
- '**.py'
- '**/linting.yml'
- '**/pylintrc'
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python environment
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip list
cd pelican
pip install -r requirements.txt --no-deps # Explicit dependency-only installation
pip install mypy types-PyYAML types-requests types-beautifulsoup4 types-markdown pylint
pip list
- name: Type testing with mypy
run: |
cd pelican
mypy --cache-dir /tmp/ --install-types --non-interactive
mypy --cache-dir /tmp/ --ignore-missing-imports .
- name: Code linting with pylint
run: |
cd pelican
pylint **/*.py