-
Notifications
You must be signed in to change notification settings - Fork 34
/
.artenolis.yml
72 lines (58 loc) · 2.17 KB
/
.artenolis.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
language: bash
before_install:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
# set the environment variable CURRENT_DIR
- CURRENT_DIR=`pwd`;
# remove the cloned repository even after failure
- rm -rf $ARTENOLIS_DATA_PATH/repos/MATLAB.devTools.CI;
# change to the current directory
- cd $CURRENT_DIR;
script:
# set the environment variable CURRENT_DIR
- CURRENT_DIR=`pwd`;
# change to the current directory
- cd $CURRENT_DIR;
# before launching the tests, make sure that the upstream repository is changed
- cd $ARTENOLIS_DATA_PATH/repos/;
- rm -rf MATLAB.devTools.CI;
- git clone [email protected]:LCSB-BioCore/MATLAB.devTools.CI.git;
- cd MATLAB.devTools.CI;
- git remote -v;
- eval "$(ssh-agent -s)";
- ssh-add ~/.ssh/id_rsa;
- git checkout develop;
- fileName=$(awk 'BEGIN {srand(); print srand()}');
- touch $fileName.txt;
- git add $fileName.txt;
- git commit -m "Adding "$fileName".txt from CI";
- git push origin develop;
- git checkout master;
- git merge develop;
- git push origin master;
- git checkout develop;
- git rm $fileName.txt;
- git commit -m "Removing "$fileName".txt from CI";
- git push origin develop;
- git checkout master;
- git merge develop;
- git push origin master;
# checkout the master branch, merge develop and push
- cd $CURRENT_DIR;
# launch the tests
- sh ./.artenolis/runtests.sh;
after_success:
# submit coverage report
- if [[ "$MATLAB_VER" == "R2018b" && "$ARCH" == "Linux" ]]; then
bash <(curl -s https://codecov.io/bash) -f "!*.lst";
fi
# deploy the documentation
- if [[ "$MATLAB_VER" == "R2018b" && "$JENKINS_PULL_REQUEST" != "True" ]]; then
export PATH="/home/jenkins/.local/bin":$PATH;
cd $CURRENT_DIR;
pip install --upgrade --user -r docs/requirements.txt;
python -c "from documenter.deploy import Documentation; doc = Documentation('github.com/opencobra/MATLAB.devTools', ci='jenkins'); doc.deploy()";
fi
after_script:
# reset the fork
- cd $ARTENOLIS_DATA_PATH/repos/fork-MATLAB.devTools.CI;
- git reset --hard origin/develop;