Skip to content

Enforcing pylint checks #131

Enforcing pylint checks

Enforcing pylint checks #131

Workflow file for this run

name: Enforcing pylint checks
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
tags:
- v*
schedule:
# Every 01:00 Sunday re-run the test on the main branch
- cron: '0 1 * * 0'
workflow_dispatch:
jobs:
update_python:
runs-on: ubuntu-20.04
name: Running pylint checks
steps:
- name: Current python version
run: python3 --version || echo python3 not installed
- name: Install Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Updated python version
run: python3 --version
- name: PYTHONPATH environment variable
run: echo ${PYTHONPATH}
- name: Update pip
run: python3 -m pip install --upgrade --no-cache-dir pip
id: pip-install
- name: Fetch/update setuptools
run: python3 -m pip install --upgrade --no-cache-dir setuptools==58.0.01
id: setuptools-install
- name: Update apt-get
run: sudo apt-get update
- name: Install python-apt
run: sudo apt-get install -y python-apt
- name: Fetch/update pylint
run: python3 -m pip install --upgrade --no-cache-dir pylint
id: pylint-install
- name: Fetch source code
uses: actions/checkout@v2
id: fetch-source
- name: Finding files
run: find . -type f -name "*.py" > action_pylint_files.txt
id: find-python-files
- name: Install Python numpy
shell: bash
run: 'python3 -m pip install --upgrade --no-cache-dir numpy Pillow wheel'
id: install-python-numpy
- name: Run action pylint script
shell: bash
run: '[ -s "action_pylint.sh" ] && (chmod +x "action_pylint.sh" && ./action_pylint.sh) || (echo "Not running special action script - empty or not found")'
id: run-special-action-script
- name: Fetching pylint.rc file
run: wget https://raw.githubusercontent.com/AgPipeline/Organization-info/master/pylint.rc
id: fetch_pylint_resource
- name: Listing
run: ls -la
- name: Files to be linted
run: cat action_pylint_files.txt
- name: Installed modules
run: python3 -m pip list
- name: Running pylint
run: cat action_pylint_files.txt | xargs python3 -m pylint --rcfile ./pylint.rc