[3C6G] Reproduction #466
Workflow file for this run
This file contains 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
## 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 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 |