-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (40 loc) · 1.31 KB
/
django_ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# django_ci.yml
name: Django CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment:
name: production
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
SECURE_SSL_REDIRECT: ${{ secrets.SECURE_SSL_REDIRECT }}
SESSION_COOKIE_SECURE: ${{ secrets.SESSION_COOKIE_SECURE }}
CSRF_COOKIE_SECURE: ${{ secrets.CSRF_COOKIE_SECURE }}
SECURE_BROWSER_XSS_FILTER: ${{ secrets.SECURE_BROWSER_XSS_FILTER }}
SECURE_CONTENT_TYPE_NOSNIFF: ${{ secrets.SECURE_CONTENT_TYPE_NOSNIFF }}
SECURE_HSTS_SECONDS: ${{ secrets.SECURE_HSTS_SECONDS }}
SECURE_HSTS_INCLUDE_SUBDOMAINS: ${{ secrets.SECURE_HSTS_INCLUDE_SUBDOMAINS }}
SECURE_HSTS_PRELOAD: ${{ secrets.SECURE_HSTS_PRELOAD }}
SECURE_REFERRER_POLICY: ${{ secrets.SECURE_REFERRER_POLICY }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
- name: Apply migrations
run: python manage.py migrate
- name: Run Tests
run: |
pytest