-
Notifications
You must be signed in to change notification settings - Fork 31
/
.travis.yml
35 lines (31 loc) · 1.04 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
branches:
only:
- main
- /^travis.*$/
language: generic
env:
global:
- APP_ENV='Travis CI'
services:
- docker
jobs:
include:
- stage: build-and-test
name: Build and Test
env:
- APP_ID='d023acb5-c8d4-426d-a572-148bfea653b4'
- ENV='Travis CI'
- APP_HOST='http://vuln-proxy:8020'
- EXEC_CMD='docker-compose --file docker-micro.yml exec vuln-django'
script:
- docker-compose --file docker-micro.yml build
- docker-compose --file docker-micro.yml up --detach
- scripts/migrations.sh
- ${EXEC_CMD} python manage.py createsuperuser --no-input
- ${EXEC_CMD} python manage.py seed polls --number=5
- ${EXEC_CMD} python manage.py test
after_success:
- docker-compose --file docker-micro.yml --file docker-micro-scan.yml up --abort-on-container-exit
- docker-compose --file docker-micro.yml --file docker-micro-scan.yml down
after_failure:
- docker-compose --file docker-micro.yml --file docker-micro-scan.yml down