From 019255202a8270eff211276c361a878b9a161754 Mon Sep 17 00:00:00 2001 From: AshwinSri23 <60453772+AshwinSri23@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:47:11 -0500 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e8ff7ac --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,33 @@ +name: Lint Flask Server + +on: + push: + branches: + - main + pull_request: + +jobs: + lint-python: + runs-on: ubuntu-latest + + steps: + # Step 1: Check out the repository + - name: Checkout code + uses: actions/checkout@v3 + + # Step 2: Set up Python environment + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.9' # Adjust to match your Python version + + # Step 3: Install flake8 (or another linter of your choice) + - name: Install flake8 + run: | + python -m pip install --upgrade pip + pip install flake8 + + # Step 4: Run flake8 on the Flask server file + - name: Run flake8 on server.py + run: | + flake8 server/server.py --count --select=E9,F63,F7,F82 --show-source --statistics