chore(deps): bump django from 4.2.16 to 4.2.17 in /backend #3274
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
name: Python | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "**" | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
lint_and_tests: | |
name: Lint and tests | |
env: | |
DJANGO_SETTINGS_MODULE: backend.settings.test | |
SRC_DIRS: backend metrics-exporter fixtures | |
BACKEND_DB_NAME: backend_default | |
BACKEND_DB_USER: backend | |
BACKEND_DB_PWD: backend | |
BACKEND_DB_HOST: localhost | |
BACKEND_DB_PORT: 5432 | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_DB: backend_default | |
POSTGRES_USER: backend | |
POSTGRES_PASSWORD: backend | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- uses: actions/[email protected] | |
id: cache | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install requirements | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade --upgrade-strategy eager -r backend/dev-requirements.txt | |
- name: Check formatting - Black | |
run: | | |
black --check --diff $SRC_DIRS | |
- name: Check formatting - isort | |
run: | | |
isort --check $SRC_DIRS | |
- name: Lint | |
run: | | |
flake8 $SRC_DIRS | |
- name: Check security - Bandit | |
run: bandit --ini=.bandit | |
- name: Mypy | |
run: mypy backend/substrapp/tasks/ | |
- name: Check for missing Django migrations | |
run: | | |
# If this fails, please run `make migrations` and commit the results | |
make check-migrations | |
- name: Check documentation | |
run: python tools/build_settings_doc.py --check | |
- name: Test | |
run: | | |
cd backend/ | |
pytest |