Making ruff and pylint parllel #97
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
name: Ufm log analyzer CI Workflow | |
on: | |
push: | |
paths: | |
- 'plugins/ufm_log_analyzer_plugin/**' | |
- '.github/workflows/ufm_log_analyzer_ci_workflow.yml' | |
jobs: | |
pylint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@main | |
- name: Set up Python | |
uses: actions/setup-python@main | |
with: | |
python-version: 3.9 | |
- name: Install dependencies and run PyLint | |
run: | | |
SCRIPT_DIR="plugins/ufm_log_analyzer_plugin" | |
# Set PYTHONPATH to include src directory and two levels up for utils | |
PYTHONPATH="$(realpath $SCRIPT_DIR/src):$(realpath $SCRIPT_DIR/../../)" | |
export PYTHONPATH | |
cd $SCRIPT_DIR | |
pip install -r src/loganalyze/requirements.txt | |
pip install pylint==3.2.6 | |
pylint --rcfile=src/loganalyze/.pylintrc src/loganalyze | |
ruff: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@main | |
- name: Set up Python | |
uses: actions/setup-python@main | |
with: | |
python-version: 3.9 | |
- name: Install and run Ruff | |
run: | | |
SCRIPT_DIR="plugins/ufm_log_analyzer_plugin" | |
cd $SCRIPT_DIR | |
pip install ruff | |
ruff format --diff --check src/loganalyze |