Skip to content

Python linting merged or pull-requested code. #792

Python linting merged or pull-requested code.

Python linting merged or pull-requested code. #792

Workflow file for this run

name: pylinting
run-name: Python linting merged or pull-requested code.
on:
push:
branches:
- 'main'
pull_request:
types:
- opened
- edited
- reopened
- synchronize
jobs:
do_linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create pip requirements.
run: |
bash build/build_scripts/create_requirements.sh > requirements.txt &&
bash build/build_scripts/create_requirements.sh all >> requirements.txt &&
echo "pylint" >> requirements.txt
- name: Set up Python 3.9 .
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pip'
- name: Install Python dependencies.
run: |
pip install -r requirements.txt
- name: Linting the Python source code.
run: |
pylint --output-format=colorized --rc-file .pylintrc spatialprofilingtoolbox/ | tee linter_output.txt
- name: Upload linter results.
uses: actions/upload-artifact@v3
with:
name: pylint-results
path: linter_output.txt
if: ${{ always() }}