Update README.md #2
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: Python Syntax Code Quality Check Workflow | |
on: | |
push: | |
branches: | |
- main | |
# schedule: | |
# - cron: '34 0 * * 6' | |
jobs: | |
pylint-check: | |
# runs-on: ubuntu-latest -- Used to run on Github hosting | |
runs-on: self-hosted | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
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 -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 }} |