Added linting GitHub workflow

This commit is contained in:
Farkhod Sadykov
2023-02-09 22:01:48 +01:00
parent 7d923e3088
commit 0ce4656e99
+28
View File
@@ -0,0 +1,28 @@
name: Lint
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
pip install black
pip install -r requirements.txt
- name: Analysing the code with pylint
run: |
pylint sgpt.py
- name: Analysing the code with black
run: |
black --target-version py310 -l 120 sgpt.py