-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.26 KB
/
tests.yaml
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
name: Tests Runner
on:
- push
- pull_request
jobs:
test:
name: Run Tests
runs-on: ubuntu-22.04
env:
ALLOWED_HOSTS: "*"
SECRET_KEY: "my big secret not seen"
EMAIL_HOST: ${{vars.EMAIL_HOST}}
EMAIL_HOST_USER: ${{vars.EMAIL_HOST_USER}}
EMAIL_HOST_PASSWORD: ${{secrets.EMAIL_HOST_PASSWORD}}
EMAIL_PORT: ${{vars.EMAIL_PORT}}
EMAIL_BACKEND: ${{vars.EMAIL_BACKEND}}
DB_NAME: ${{vars.DB_NAME}}
DB_USER: ${{vars.DB_USER}}
DB_PSW: ${{vars.DB_PSW}}
services:
postgres:
image: postgres:12
env:
POSTGRES_HOST_AUTH_METHOD: trust
options: --health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Get the code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: "reqs/*.txt"
- name: Install OS packages
run: sudo apt install python3-dev
- name: Install Python packages
run: pip install -r reqs/reqlinux.txt -r reqs/dev.txt
- name: Test it
run: python manage.py test