add type static-code-analysis that is required for jenkins #531
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: python lint | |
on: | |
push: | |
paths: | |
- '**.py' | |
- '.github/workflows/python-lint.yaml' | |
- 'api/setup.cfg' | |
- 'cli/setup.cfg' | |
- 'api/pyproject.toml' | |
- 'cli/pyproject.toml' | |
jobs: | |
python-lint: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- directory: "cli/" | |
name: "cli-linter" | |
- directory: "api/" | |
name: "api-linter" | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: 3.11 | |
- name: Install Python dependencies | |
run: pip install -r ${{ matrix.directory }}requirements.txt | |
- name: Install Python linting dependencies | |
run: pip install black flake8 mypy pylint | |
- name: Run linters | |
uses: wearerequired/lint-action@v2 | |
with: | |
auto_fix: false | |
continue_on_error: false | |
mypy: true | |
mypy_dir: ${{ matrix.directory }} | |
flake8: true | |
flake8_dir: ${{ matrix.directory }} | |
black: true | |
black_args: --config pyproject.toml | |
black_dir: ${{ matrix.directory }} | |
black_auto_fix: true | |
pylint: true | |
pylint_args: --rcfile pyproject.toml | |
pylint_dir: ${{ matrix.directory }} |