Skip to content

feat: added workflow for PR validation with pylint and pytests #14

feat: added workflow for PR validation with pylint and pytests

feat: added workflow for PR validation with pylint and pytests #14

Workflow file for this run

name: Lint
# This workflow runs when a pull request is opened or updated
on:
pull_request:
branches: [ main ]
types: [ opened, synchronize, reopened ]
# Run on push to main as well to ensure main stays clean
push:
branches: [ main ]
jobs:
pylint:
name: Pylint
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
# Install dependencies needed for linting
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
# Install package dependencies
pip install -e .
# Install test dependencies
pip install -e ".[test]"
# Run pylint on the src directory using the .pylintrc configuration
- name: Run pylint
run: |
pylint --rcfile=pylintrc src/secops