-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d20995
commit 0192552
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |