-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (38 loc) · 1.02 KB
/
.travis.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
language: python
sudo: required
addons:
postgresql: "10"
apt:
packages:
- postgresql-10
- postgresql-client-10
env:
global:
- PGPORT=5433
python:
- "3.5"
- "3.6"
- "3.7-dev"
services:
- postgresql
install:
# For Codecov
- pip install codecov
# Install requirements
- pip install -r requirements.txt
# Setup PostgreSQL DB
- psql --command "CREATE DATABASE mario64rivals;"
- psql --command "CREATE USER azurediamond WITH PASSWORD 'hunter2';"
- psql --command "ALTER ROLE azurediamond SET client_encoding TO 'utf8';"
- psql --command "ALTER ROLE azurediamond SET default_transaction_isolation TO 'read committed';"
- psql --command "ALTER ROLE azurediamond SET timezone TO 'UTC';"
- psql --command "GRANT ALL PRIVILEGES ON DATABASE mario64rivals TO azurediamond;"
- psql --command "ALTER USER azurediamond CREATEDB;"
script:
# Create an .env file
- cp .env.example .env
# Run tests
- coverage run manage.py migrate
- coverage run manage.py test
after_success:
- codecov