| |
| name: Run Linting/Formatting on Pull Requests |
|
|
| on: |
| - push |
| - pull_request |
| |
| |
| |
| |
| |
| |
| |
|
|
| jobs: |
| lint: |
| runs-on: ubuntu-latest |
| steps: |
| - name: Checkout Code |
| uses: actions/checkout@v3 |
| - name: Set up Python 3.10 |
| uses: actions/setup-python@v4 |
| with: |
| python-version: 3.10.6 |
| cache: pip |
| cache-dependency-path: | |
| **/requirements*txt |
| - name: Install PyLint |
| run: | |
| python -m pip install --upgrade pip |
| pip install pylint |
| |
| - name: Install dependencies |
| run: | |
| export COMMANDLINE_ARGS="--skip-torch-cuda-test --exit" |
| python launch.py |
| - name: Analysing the code with pylint |
| run: | |
| pylint $(git ls-files '*.py') |
| |