From 5ccd953afd8dd1653b6f90df65649a0e0091851e Mon Sep 17 00:00:00 2001 From: Debasish Pal <48341250+debpal@users.noreply.github.com> Date: Wed, 11 Sep 2024 11:44:48 +0300 Subject: [PATCH] github actions --- .github/workflows/linting.yml | 33 ++++++++++++++++++++++++++++ .github/workflows/python-package.yml | 5 ----- requirements.txt | 1 - 3 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/linting.yml diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..28e9b5c --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,33 @@ +name: lint + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + + - 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 + python -m pip install flake8 + + - name: Lint with flake8 + run: | + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics \ No newline at end of file diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index e78497f..844acb5 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -27,11 +27,6 @@ jobs: python -m pip install --upgrade pip python -m pip install -r requirements.txt - - name: Lint with flake8 - run: | - flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Type check with mypy run: | mypy BharatFinTrack diff --git a/requirements.txt b/requirements.txt index c532f42..a6a55c3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ pytest pytest-cov -flake8 mypy