Skip to content

08MQ preprocessing instantiable #191

08MQ preprocessing instantiable

08MQ preprocessing instantiable #191

Workflow file for this run

## Disclaimer - This GitHub Actions workflow performs a static analysis of the python code.
# Name the workflow
name: code_quality
# Define when it runs
on:
push:
paths:
- '**.py'
- '.github/workflows/code_quality.yml'
pull_request:
paths:
- '**.py'
- '.github/workflows/code_quality.yml'
# Jobs that define the workflow
jobs:
# Name of the job running pylint
pylint:
# Define the OS
runs-on: ubuntu-latest
# Steps that define the job
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[tests]
- name: Analyse the code with pylint
run: |
pylint --fail-under 8 --ignore-paths narps_open/pipelines/ narps_open > pylint_report_narps_open.txt
pylint --fail-under 8 tests > pylint_report_tests.txt
- name: Archive pylint results
uses: actions/upload-artifact@v3
if: failure() # Only if previous step failed
with:
name: pylint-reports-python
path: |
pylint_report_narps_open.txt
pylint_report_tests.txt
retention-days: 15