Skip to content

chore: add limits and requests configuration in values (#867) #2676

chore: add limits and requests configuration in values (#867)

chore: add limits and requests configuration in values (#867) #2676

Workflow file for this run

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/cache@v4.0.2
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