-
Notifications
You must be signed in to change notification settings - Fork 20
44 lines (37 loc) · 1.08 KB
/
main.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
name: Main pipeline
on:
push:
branches: ['*']
pull_request:
branches: [ master ]
jobs:
django_test:
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:10 # Minimal version supported by our Django version (3.2)
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 10
steps:
- uses: actions/checkout@v2
- name: Install system packages
run: |
sudo apt-get update -qq
sudo apt-get install -y libappindicator1 fonts-liberation libunwind8-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
cache: 'pip'
python-version: 3.6
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements/testing.txt
- name: Run Tests
run: pytest
env:
DATABASE_URL: 'postgres://postgres:postgres@localhost:5432/postgres'