@@ -36,10 +36,12 @@ source venv/bin/activate
3636pip install -r requirements.txt
3737```
3838
39- 3 . Load local development environment variables:
39+ 3 . Set required environment variables:
4040
4141``` bash
42- source ./local-dev-env.sh
42+ export TIMEPOLL_SECRET_KEY=' dev-only-secret-change-me'
43+ export TIMEPOLL_DEBUG=' 1'
44+ export TIMEPOLL_ALLOWED_HOSTS=' 127.0.0.1,localhost'
4345```
4446
45474 . Run migrations:
@@ -61,12 +63,31 @@ python manage.py runserver
6163## Tests
6264
6365``` bash
64- source ./local-dev-env.sh
6566python manage.py test
6667```
6768
69+ ## CI merge gates
70+
71+ This repository includes GitHub Actions checks in ` .github/workflows/ci.yml ` :
72+
73+ - ` ruff check . `
74+ - ` mypy polls timepoll manage.py --ignore-missing-imports --exclude "polls/migrations/.*" `
75+ - ` bandit -r polls timepoll manage.py -x polls/migrations `
76+ - ` pip-audit --requirement requirements.txt `
77+ - ` python manage.py test `
78+
79+ To enforce these checks as merge gates in GitHub:
80+
81+ 1 . Enable branch protection on your default branch.
82+ 2 . Enable ` Require a pull request before merging ` .
83+ 3 . Enable ` Require review from Code Owners ` .
84+ 4 . Enable ` Require status checks to pass before merging ` and select ` CI / quality ` .
85+
6886## Notes
6987
7088- Vue app code is in Django static files.
7189- Vue runtime is loaded from Wikimedia CDN: ` https://tools-static.wmflabs.org/cdnjs/... ` .
72- - ` local-dev-env.sh ` creates/loads local env vars needed by settings (` TIMEPOLL_SECRET_KEY ` , ` TIMEPOLL_DEBUG ` , ` TIMEPOLL_ALLOWED_HOSTS ` ).
90+ - Required environment variables:
91+ - ` TIMEPOLL_SECRET_KEY ` : non-empty secret string
92+ - ` TIMEPOLL_DEBUG ` : boolean-like string (` 1/0 ` , ` true/false ` , ` yes/no ` , ` on/off ` )
93+ - ` TIMEPOLL_ALLOWED_HOSTS ` : comma-separated hostnames (for example ` 127.0.0.1,localhost ` )
0 commit comments