From 464c86eb901aec3cff0ae8c3ec1dbab908d087e3 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Date: Wed, 21 Apr 2021 01:33:37 +0500 Subject: [PATCH] Add flake8 checker --- .github/workflows/lint.yml | 21 +++++++++++++++++++++ Makefile | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) 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..0baf960 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,21 @@ +name: flake8 + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v1 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 + - name: Analysing the code with flake8 + run: flake8 . diff --git a/Makefile b/Makefile index e48b013..21b72cf 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ COMMIT_HASH=$(shell git rev-parse --short HEAD) check: ifeq ("$(wildcard ./venv-${COMMIT_HASH})","") @rm -rf venv-* - @apt install -y python3-distutils python3-pip python3-venv >/dev/null 2>&1 + @${PYTHON} -m pip install -U virtualenv >/dev/null 2>&1 @${PYTHON} -m venv venv-${COMMIT_HASH} @. ./venv-${COMMIT_HASH}/bin/activate && \ python3 -m pip install -r requirements.txt >/dev/null 2>&1 && \