-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (35 loc) · 1.11 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
sudo: required
services:
- docker
stages:
- build
- test
jobs:
include:
- stage: build
script: docker build -t logistics-index .
after_script: docker system prune -af
- stage: test
name: "unit"
before_script: docker build -t logistics-index .
script: docker run --rm logistics-index -m pytest tests/unit -vv
after_script: docker system prune -af
- name: "flake8"
before_script: docker build -t logistics-index .
script: docker run --rm logistics-index -m flake8 src
after_script: docker system prune -af
- name: "functional"
before_script: docker build -t logistics-index .
script:
- docker run --rm -d --name=logistics-index-web
-p 5000:5000
-e POSTGRES_USER=postgres
-e POSTGRES_PASSWORD=postgres
-e POSTGRES_HOST=postgres
-e POSTGRES_PORT=5432
-e POSTGRES_DB=postgres
logistics-index
- sh waitforweb.sh localhost:5000 5
after_script:
- docker stop logistics-index-web
- docker system prune -af