-
Notifications
You must be signed in to change notification settings - Fork 5
/
.gitlab-ci.yml
87 lines (80 loc) · 2.27 KB
/
.gitlab-ci.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
stages:
# Set up two testing paths
- setup
- test
- deploy
- release
setup-job:
tags:
- matlab
stage: setup
script:
- cd ..
- if (test-path utilities) { rm -r -force utilities }
- git clone git@insidelabs-git.mathworks.com:modular-curriculum-content/utilities.git
- cd $CI_PROJECT_NAME
allow_failure: false
smoke-test:
# Smoke tests should run all the time
tags:
# Add additional tags like (e.g. - arduino) as required
# Make sure that the runner you plan to use matches the tags
- matlab
stage: test
parallel:
matrix:
- VERSION: [R2024a,R2024b]
script:
- Set-Alias -Name matlab -Value "C:\Program Files\MATLAB\$VERSION\bin\matlab.exe"
- matlab -batch "openProject(pwd);RunAllTests"
when: always
allow_failure: true
artifacts:
name: "$VERSION"
paths:
- public/*
when: always
pages:
tags:
- matlab
stage: deploy
script:
- matlab -batch "openProject(pwd);PostSmokeTest;"
artifacts:
paths:
- public
file-test:
tags:
- matlab
stage: release
script:
- matlab -batch "proj = openProject(pwd);
addpath(proj.RootFolder+'/InternalFiles/Tests/CI');
results = runtests('OpenCloseFileTest.m');
disp(table(results)); assertSuccess(results);"
rules:
# This test should always run when merging to main
# And be available for manual running on any push
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
when: always
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
when: manual
allow_failure: true
release-testing:
tags:
- matlab
stage: release
script:
- matlab -batch "proj = openProject(pwd);
cd ..;
addpath(genpath(fullfile('utilities','TestingResources')));
addpath(genpath(fullfile('utilities','Tools')));
runCMTests"
rules:
# This test should always run when merging to main
# And be available for manual running on any push
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
when: always
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
when: manual
allow_failure: true