From 0ce4656e9918271edb69c8f965414528f0ee5d19 Mon Sep 17 00:00:00 2001 From: Farkhod Sadykov Date: Thu, 9 Feb 2023 22:01:48 +0100 Subject: [PATCH] Added linting GitHub workflow --- .github/workflows/lint.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..033e751 --- /dev/null +++ b/.github/workflows/lint.yml @@ -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