Skip to content

Commit

Permalink
Update pylint.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
codewithmuh authored Jan 14, 2024
1 parent 253c9b8 commit 0c519e6
Showing 1 changed file with 25 additions and 18 deletions.
43 changes: 25 additions & 18 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
name: Code Quality Check Workflow
name: Python Pylint Check

on:
push:
branches:
- main
# schedule:
# - cron: '34 0 * * 6'
on: [push]

jobs:
build:
pylint-check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
python-version: '3.10' # Choose the desired Python version

- name: Create virtual environment
run: python -m venv venv
working-directory: ${{ github.workspace }}

- name: Activate virtual environment and install dependencies
run: |
source venv/bin/activate
python -m pip install --upgrade pip
pip install pylint
- name: Analysing the code with pylint
pip install -r requirements/requirements.txt # Install dependencies from requirements.txt in the 'requirements' folder
deactivate # Deactivate the virtual environment
working-directory: ${{ github.workspace }}

- name: Analyze code with Pylint
run: |
source venv/bin/activate
pylint $(git ls-files '*.py')
deactivate
working-directory: ${{ github.workspace }}

0 comments on commit 0c519e6

Please sign in to comment.