From 9764b019c62d9d1e08abd6f1fa10cb37ddab2c9e Mon Sep 17 00:00:00 2001 From: Brijeshthummar02 Date: Sun, 20 Oct 2024 10:50:04 +0530 Subject: [PATCH 1/2] Add GitHub Actions workflow for linting with Flake8 --- .github/workflows/lint.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 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..eb4129f --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,31 @@ +name: Lint Code + +on: + push: + branches: + - main # Change to your default branch if different + pull_request: + branches: + - main # Change to your default branch if different + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.8' # Specify the Python version you need + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 + + - name: Run flake8 + run: | + flake8 . # This will lint all Python files in the repo From 6412972a93c418857631d53450c298c2d5848f81 Mon Sep 17 00:00:00 2001 From: Brijeshthummar02 Date: Sun, 20 Oct 2024 10:51:41 +0530 Subject: [PATCH 2/2] Lint --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index eb4129f..e25ecc6 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.8' # Specify the Python version you need + python-version: '3.8' # Specify the Python version you need - name: Install dependencies run: |