Merge pull request #3 from GuidoBorrelli/refactor/project-modernization #8
This file contains hidden or 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: Code Quality | |
| on: | |
| push: | |
| branches: [ master, main, develop ] | |
| pull_request: | |
| branches: [ master, main, develop ] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.9'] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install linting tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 pylint black isort | |
| - name: Lint with flake8 | |
| run: | | |
| # Stop the build if there are Python syntax errors or undefined names | |
| flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # Exit-zero treats all errors as warnings | |
| flake8 . --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics | |
| continue-on-error: true | |
| - name: Check code formatting with black | |
| run: | | |
| black --check --diff . --exclude="__pycache__|\.git|\.venv" | |
| continue-on-error: true | |
| - name: Check import sorting with isort | |
| run: | | |
| isort --check-only --diff . | |
| continue-on-error: true | |