|
| 1 | +name: Quality |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - 'pydocstyle_gitlab_code_quality/**' |
| 7 | + - 'ci_requirements.txt' |
| 8 | + - 'pyproject.toml' |
| 9 | + |
| 10 | +jobs: |
| 11 | + pylint: |
| 12 | + name: Pylint - Python ${{ matrix.python_version }} |
| 13 | + runs-on: ubuntu-latest |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v3 |
| 20 | + - uses: ./.github/actions/install_dependencies |
| 21 | + with: |
| 22 | + python_version: ${{ matrix.python_version }} |
| 23 | + - name: Run pylint |
| 24 | + run: | |
| 25 | + pylint --output-format=colorized $(git ls-files '*.py') |
| 26 | + mypy: |
| 27 | + name: Mypy - Python ${{ matrix.python_version }} |
| 28 | + runs-on: ubuntu-latest |
| 29 | + strategy: |
| 30 | + fail-fast: false |
| 31 | + matrix: |
| 32 | + python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v3 |
| 35 | + - uses: ./.github/actions/install_dependencies |
| 36 | + with: |
| 37 | + python_version: ${{ matrix.python_version }} |
| 38 | + - name: Run mypy |
| 39 | + run: | |
| 40 | + mypy --config-file pyproject.toml . |
| 41 | + isort: |
| 42 | + name: Isort - Python ${{ matrix.python_version }} |
| 43 | + runs-on: ubuntu-latest |
| 44 | + strategy: |
| 45 | + fail-fast: false |
| 46 | + matrix: |
| 47 | + python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v3 |
| 50 | + - uses: ./.github/actions/install_dependencies |
| 51 | + with: |
| 52 | + python_version: ${{ matrix.python_version }} |
| 53 | + - name: Run isort |
| 54 | + run: | |
| 55 | + isort --settings-file pyproject.toml --check --diff --color . |
| 56 | + black: |
| 57 | + name: Black - Python ${{ matrix.python_version }} |
| 58 | + runs-on: ubuntu-latest |
| 59 | + strategy: |
| 60 | + fail-fast: false |
| 61 | + matrix: |
| 62 | + python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v3 |
| 65 | + - uses: ./.github/actions/install_dependencies |
| 66 | + with: |
| 67 | + python_version: ${{ matrix.python_version }} |
| 68 | + - name: Run black |
| 69 | + run: | |
| 70 | + black --config pyproject.toml --check --diff --color . |
0 commit comments