Add python linting workflow to check quality of python code #1
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
name: Pylint | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: [macos-latest, ubuntu-latest] | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
# conda activate opencbdc_env | |
python -m pip install --upgrade pip | |
if [ -f requirements_py.txt ]; then pip install -r requirements_py.txt; fi | |
pip install pylint | |
- name: Lint with Pylint | |
run: | | |
# conda activate opencbdc_env | |
pylint $(git ls-files '*.py') |