Skip to content

Commit

Permalink
[add] Python script checkers
Browse files Browse the repository at this point in the history
  • Loading branch information
lpascal-ledger committed Nov 8, 2023
1 parent 4f0e964 commit fa5fc07
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/fast-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Fast Python checks

on:
workflow_dispatch:
push:
branches:
- develop
- master
pull_request:

jobs:
lint:
strategy:
matrix:
directory:
- build_and_test
- create_app_list
- output_scripts
- split_input

name: Linting
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
- run: pip install flake8
- name: Flake8 lint Python code
run: find scripts/${{ matrix.directory }} -type f -name '*.py' -exec flake8 --max-line-length=120 '{}' '+'

mypy:
strategy:
matrix:
directory:
- build_and_test
- create_app_list
- output_scripts
- split_input

name: Type checking
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
- run: pip install mypy
- name: Mypy type checking
run: mypy scripts/${{ matrix.directory }}

misspell:
name: Check misspellings
runs-on: ubuntu-latest
steps:
- name: Clone
uses: actions/checkout@v3
- name: Check misspellings
uses: codespell-project/actions-codespell@v1
with:
builtin: clear,rare
check_filenames: true
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tool.mypy]
ignore_missing_imports = true

0 comments on commit fa5fc07

Please sign in to comment.