-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathtestCheckSystem.m
executable file
·78 lines (55 loc) · 1.88 KB
/
testCheckSystem.m
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
73
74
75
76
77
78
global gitConf
global gitCmd
% define the configuration of the MATLAB.devTools
launcher = '\n\n ~~~ MATLAB.devTools ~~~\n\n';
remoteRepoURL = 'https://github.com/LCSB-Biocore/MATLAB.devTools.CI.git';
nickName = 'MATLAB.devTools.CI';
printLevel = 1;
% reset the development tools
resetDevTools();
% set the configuration
confDevTools(nickName, 'remoteRepoURL', remoteRepoURL, 'launcher', launcher, ...
'nickName', nickName, 'printLevel', printLevel);
% check the system
checkSystem();
% initialize the devTools
initDevTools(); % <-- input 1: artenobot, input 2: /path/specified/
% check the devTools
checkDevTools()
% remove the local fork
%system('rm -rf ~/fork-MATLAB.devTools.CI')
% check if the remote fork exists
checkRemoteFork();
% initialize the devTools
%initDevTools();
% update the fork
updateFork();
% test scenario
% create 3 files at the root
system('touch testFile1.txt;')
system('touch testFile2.txt;')
initContribution('branch-test-1');
submitContribution('branch-test-1'); % <-- input 4: y, input 5: n, input 6: testFile1, input 7: y
initContribution('branch-test-2');
submitContribution('branch-test-2'); % < -- input 8: y, input 9: testFile2, input 10: n
% delete the branches
system('git branch -D branch-test-1');
system('git branch -D branch-test-2');
system('git push origin --delete branch-test-1');
system('git push origin --delete branch-test-2');
% create a test branch
initContribution('add-test-CI');
% create a user file
system('touch test-CI.txt;'); %' git add test-CI.txt; git commit -m "Adding test-CI.txt from CI"; git push origin add-test-CI;')
submitContribution('add-test-CI'); % <-- input 3: n
% open a pull request
openPR('add-test-CI');
delete('test-CI.txt');
% list available branches
listBranches();
% check the status of the repository
checkStatus();
% reset the local fork
resetLocalFork();
% reset the development tools
resetDevTools();