-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
39 lines (39 loc) · 1.1 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
dist: focal
language: python
env:
global:
- PGVER=12
- PGPORT=5432
addons:
postgresql: "12"
apt:
packages:
- postgresql-12
- postgresql-client-12
# services:
# - postgresql
# - docker
python:
- "3.7"
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libsqlite3-dev
- sqlite3 --version
- sudo apt-get update
- sudo cp /etc/postgresql/12/main/pg_hba.conf pg_hba.conf
# - sudo apt-get --yes remove postgresql\*
- sudo apt-get install -y postgresql-12 postgresql-client-12
- sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/12/main/postgresql.conf
- sudo sed -i 's/#idle_in_transaction_session_timeout = 0/idle_in_transaction_session_timeout = 30000/' /etc/postgresql/12/main/postgresql.conf
- sudo cp pg_hba.conf /etc/postgresql/12/main/pg_hba.conf
- sudo service postgresql restart 12
before_script:
- psql -c 'create database travis_ci_test_repo_tools;' -U postgres
install:
- pip install -r requirements.txt
- pip install codecov pytest-cov
- pip install psycopg2
- python setup.py develop
script: pytest --cov=./
after_success:
- codecov