-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
47 lines (41 loc) · 1.05 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
language: python
python:
- "3.7"
stages:
- lint
- test
cache:
pip: true
directories:
- "$HOME/.cache/pre-commit"
addons:
apt:
packages:
- postgresql-12
- postgresql-client-12
jobs:
include:
- stage: lint
install:
- pip install poetry pre-commit
- poetry install -v
- poetry run pre-commit install
script:
- poetry run pre-commit run --all-files
- stage: test
before_install:
- sudo cp /etc/postgresql/{9.6,12}/main/pg_hba.conf
- sudo pg_ctlcluster 12 main restart
- psql -c 'CREATE DATABASE defaultdb;' -U postgres -p 5433
before_script:
- cp monitor.example-config.yaml ~/.config/monitor.yaml
- |
sed -i "s|uri:.*$|uri: 'postgres://postgres@localhost:5433/defaultdb?sslmode=require'|" ~/.config/monitor.yaml
after_script:
- rm -f ~/.config/monitor.yaml
install:
- pip install poetry
- poetry install -v
script:
- poetry run pytest tests
- poetry run make coverage