diff --git a/.github/workflows/backend-linting.yaml b/.github/workflows/backend-linting.yaml new file mode 100644 index 00000000..d145985d --- /dev/null +++ b/.github/workflows/backend-linting.yaml @@ -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 diff --git a/.github/workflows/backend-tests.yaml b/.github/workflows/backend-tests.yaml index cd8149f7..48768a80 100644 --- a/.github/workflows/backend-tests.yaml +++ b/.github/workflows/backend-tests.yaml @@ -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 diff --git a/backend/.flake8 b/backend/.flake8 index b92dcdfc..ee3e436d 100644 --- a/backend/.flake8 +++ b/backend/.flake8 @@ -11,4 +11,5 @@ exclude = .git, __pycache__, .venv, venv, - migrations \ No newline at end of file + migrations +