-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
41 lines (36 loc) · 1.28 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
dist: bionic
language: cpp
compiler:
- gcc
- clang
cache:
directories:
- $HOME/.conan/data
addons:
apt:
packages: lcov
services:
- mysql
before_install:
- mysql -e 'create database oop;'
- mysql oop < utils/db.sql
- sed -i 's/172.16.0.78/127.0.0.1/g' utils/database_connection.cpp
- sed -i 's/LJi8kLPc2KaGjEJF//g' utils/database_connection.cpp
- sed -i 's/user = "oop"/user = "root"/g' utils/database_connection.cpp
- sed -i 's/false/true/g' utils/database_connection.cpp
script:
- WORKDIR=`pwd`
- cd $WORKDIR/script/; ./build_dependencies.sh
- cd $WORKDIR/build_test/; ./GTestSelf >/dev/null 2>&1
- cd $WORKDIR/test/input_tests/initPassword; ./intpassword_test.sh
# main input test case 1
- cd $WORKDIR/test/input_tests/main_input_case-01; ./test.sh
- cd $WORKDIR/test/input_tests/main_input_case-02; ./test.sh
after_success:
- cd $WORKDIR/
# Create lcov report
- lcov --capture --directory . --output-file coverage.info
- lcov --remove coverage.info '/usr/*' "${HOME}"'/OOP-Project/utils/*' "${HOME}"'/.cache/*' --output-file coverage.info # filter system-files
- lcov --list coverage.info # debug info
# Uploading report to CodeCov
- bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"