-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (49 loc) · 1.8 KB
/
django.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
48
49
50
51
52
53
54
55
name: Django CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Set up Environment Variables
run: |
echo "TSUPPORT_SECRET_KEY=mydummysecretkey" >> $GITHUB_ENV
echo "TSUPPORT_DATABASE_NAME=" >> $GITHUB_ENV
echo "TSUPPORT_DATABASE_USER=" >> $GITHUB_ENV
echo "TSUPPORT_DATABASE_PASSWORD=" >> $GITHUB_ENV
echo "TSUPPORT_DATABASE_HOST=" >> $GITHUB_ENV
echo "TSUPPORT_DATABASE_PORT=" >> $GITHUB_ENV
echo "TSUPPORT_SITE_ID=1" >> $GITHUB_ENV
echo "DEBUG=True" >> $GITHUB_ENV
echo "EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend" >> $GITHUB_ENV
echo "EMAIL_HOST=mydummyemailhost" >> $GITHUB_ENV
echo "EMAIL_PORT=587" >> $GITHUB_ENV
echo "EMAIL_USE_TLS=True" >> $GITHUB_ENV
echo "EMAIL_HOST_USER=mydummyemailuser" >> $GITHUB_ENV
echo "EMAIL_HOST_PASSWORD=mydummyemailpassword" >> $GITHUB_ENV
echo "GOOGLE_CLIENT_ID=mydummyclientid" >> $GITHUB_ENV
echo "GOOGLE_CLIENT_SECRET=mydummyclientsecret" >> $GITHUB_ENV
echo "GOOGLE_API_KEY=mydummyapikey" >> $GITHUB_ENV
echo "GOOGLE_CHAT_WEB_HOOK_URL=mydummywebhookurl" >> $GITHUB_ENV
- name: Create migrations
run: |
python manage.py makemigrations
- name: Run Tests
run: |
python manage.py test