Skip to content

Commit 158ff02

Browse files
committed
Create stages
1 parent e06d366 commit 158ff02

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

.travis.yml

+7-4
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ os: linux
55
dist: focal
66
python: 3.8
77

8+
env:
9+
- RELEASE_PACKAGE=jarvis_package.tar
10+
811
jobs:
912
include:
10-
- stage: setup
13+
- stage: test
1114
script:
1215
- sudo bash bin/deploy/install_system_dependencies.sh
1316
- bash bin/deploy/install_python_dependencies.sh
14-
- stage: test
15-
script:
1617
- sudo bash bin/tests/run_tests_on_travis.sh
18+
after_success:
19+
- sudo bash bin/deploy/merge_develop_to_master.sh
1720
- stage: deploy
1821
before_deploy:
1922
- sudo bash setup.sh
@@ -23,7 +26,7 @@ jobs:
2326
provider: releases
2427
skip_cleanup: true
2528
api_key: $GITHUB_TOKEN
26-
file: jarvis_package.tar
29+
file: $RELEASE_PACKAGE
2730
on:
2831
branch: master
2932

bin/tests/run_tests_on_travis.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ sudo systemctl start mongodb
1414
# Run unittests
1515
# --------------------------------
1616
python -m unittest discover -s ./src -p "*tests.py"
17+
exit_code=($?)
1718

1819
# --------------------------------
1920
# Stop MongoDB service
2021
# --------------------------------
21-
sudo systemctl stop mongodb
22+
sudo systemctl stop mongodb
23+
24+
exit $exit_code

run_tests.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ sudo systemctl start mongodb
1414
# Run unittests
1515
# --------------------------------
1616
python -m unittest discover -s ./src -p "*tests.py"
17+
exit_code=($?)
1718

1819
# --------------------------------
1920
# Stop MongoDB service
2021
# --------------------------------
21-
sudo systemctl stop mongodb
22+
sudo systemctl stop mongodb
23+
24+
exit $exit_code

0 commit comments

Comments
 (0)