Skip to content

Black Formatting & Pylint Linting #38

Black Formatting & Pylint Linting

Black Formatting & Pylint Linting #38

# GitHub Action for performing Black Formatting and Pylint Linting
# Author: Andrew Jarombek
# Date: 10/8/2022
name: Black Formatting & Pylint Linting
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "0 5 * * 5"
workflow_dispatch:
jobs:
linting_formatting:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- run: echo "Job running on a ${{ runner.os }} server"
- name: Check out repository code
uses: actions/checkout@v3
- name: Black formatting dry run
uses: psf/black@stable
with:
options: "--check"
src: "./api/src"
- name: Install Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Pylint & Pipenv
run: |
pip install --upgrade pip
pip install pylint==2.15.9
pip install pipenv==2022.12.19
- name: Analyzing the Code with Pylint
working-directory: ./api/src
run: |
pipenv install --ignore-pipfile --system
pylint $(git ls-files '*.py')