Skip to content

Commit 6d73373

Browse files
committed
Set up lint and mypy for pelican
1 parent d97b580 commit 6d73373

File tree

4 files changed

+629
-0
lines changed

4 files changed

+629
-0
lines changed

.github/workflows/linting.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Linting and MyPy (Pelican)
2+
on:
3+
push:
4+
paths-ignore:
5+
- '**/pelican-action-test.yml'
6+
workflow_dispatch:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
15+
- name: Install dependencies
16+
run: |
17+
pip list
18+
cd pelican
19+
pip install -r requirements.txt --no-deps # explicit only
20+
pip install mypy
21+
pip install types-PyYAML
22+
pip install types-requests
23+
pip install types-beautifulsoup4
24+
pip install types-markdown
25+
pip install pylint
26+
pip list
27+
- name: Type testing with mypy
28+
run: |
29+
cd pelican
30+
mypy --cache-dir /tmp/ --install-types
31+
mypy --cache-dir /tmp/ --ignore-missing-imports .
32+
- name: Testing with pylint
33+
if: always()
34+
run: |
35+
cd pelican
36+
pylint *.py */*.py */*/*.py

.github/workflows/pelican-action-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Test the Pelican build action
22
on:
33
push:
4+
paths-ignore:
5+
- '**/linting.yml'
46
workflow_dispatch:
57
jobs:
68
pelican-test:

0 commit comments

Comments
 (0)