Skip to content

Commit

Permalink
Merge pull request #48 from SELab-2/linting-checks
Browse files Browse the repository at this point in the history
Automated linting checks
  • Loading branch information
EwoutV authored Mar 5, 2024
2 parents 8047e7c + 6740434 commit 89cdb0b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/backend-linting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: backend-linting

on:
push:
branches: [main, development]
pull_request:
branches: [main, development]
workflow_dispatch:

jobs:
test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r ./backend/requirements.txt
- name: Execute linting checks
run: flake8 --config ./backend/.flake8 ./backend
1 change: 1 addition & 0 deletions .github/workflows/backend-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r ./backend/requirements.txt
- name: Execute tests
run: python ./backend/manage.py test
3 changes: 2 additions & 1 deletion backend/.flake8
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ exclude = .git,
__pycache__,
.venv,
venv,
migrations
migrations

0 comments on commit 89cdb0b

Please sign in to comment.