forked from BobasB/devops_course
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
45 lines (43 loc) · 1.18 KB
/
.travis.yml
File metadata and controls
45 lines (43 loc) · 1.18 KB
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
language: python
python:
- "3.7"
jobs:
include:
- stage: "Build Lab 2."
name: "Run tests for Lab 2"
python: 3.7
install:
- cd ./lab2/
- pipenv install
script: pipenv run pytest tests/tests.py || true
- stage: "Build Lab 3."
name: "Run Djungo Server and test it accessibility. Fail to run and test"
python: 3.7
install:
- cd ./lab3/
- pipenv install
script: ./scripts/travis-build.sh
- stage: "Build Lab 4."
name: "Build Docker images & Home task"
services:
- docker
install:
- cd ./lab4/
script:
- docker build -t bobas/lab4-examples:django-travis .
- docker images
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin; docker push bobas/lab4-examples:django-travis; else echo "PR skip deploy"; fi
- stage: "Build Lab 5."
name: "Build and run Docker images via make"
services:
- docker
install:
- cd ./lab5/
- make app
- make tests
script:
- make run
- make test-app
branches:
only:
- master