-
Notifications
You must be signed in to change notification settings - Fork 84
87 lines (76 loc) · 3.16 KB
/
Copy pathtests-walkthroughs.yml
File metadata and controls
87 lines (76 loc) · 3.16 KB
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
name: tests-walkthroughs
# Tier B integration tests: runs the canlab_help_* walkthroughs from
# the CANlab_help_examples repository end-to-end as a nightly job.
# These are slower and depend on more sibling repositories than the
# fast unit suite (test.yml), so they're not part of the per-push CI.
on:
schedule:
# Run nightly at 07:00 UTC (~midnight Pacific / ~02:00 Central).
- cron: '0 7 * * *'
workflow_dispatch:
jobs:
matlab-walkthroughs:
name: MATLAB ${{ matrix.matlab-release }} walkthroughs on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
matlab-release: [R2024b]
steps:
- name: Checkout CanlabCore
uses: actions/checkout@v4
with:
path: CanlabCore
- name: Checkout Neuroimaging_Pattern_Masks
uses: actions/checkout@v4
with:
repository: canlab/Neuroimaging_Pattern_Masks
path: Neuroimaging_Pattern_Masks
- name: Checkout CANlab_help_examples
uses: actions/checkout@v4
with:
repository: canlab/CANlab_help_examples
path: CANlab_help_examples
- name: Checkout RobustToolbox
# Provides weighted_corrcoef (Robust_stats_functions/), a dependency of
# plot_correlation_samefig's robust branch used by the regression
# walkthrough. A normal canlab_toolbox_setup install adds this sibling
# repo to the path; CI must too, or walkthrough 5 errors with
# "Undefined function 'weighted_corrcoef'".
uses: actions/checkout@v4
with:
repository: canlab/RobustToolbox
path: RobustToolbox
- name: Clone SPM25
run: git clone --depth=1 --branch 25.01.02 https://github.com/spm/spm.git "${GITHUB_WORKSPACE}/spm"
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: ${{ matrix.matlab-release }}
products: |
Statistics_and_Machine_Learning_Toolbox
Signal_Processing_Toolbox
Image_Processing_Toolbox
cache: true
- name: Run walkthrough tests
uses: matlab-actions/run-command@v2
with:
command: |
addpath(genpath('CanlabCore'));
addpath(genpath('Neuroimaging_Pattern_Masks'));
addpath(genpath('CANlab_help_examples'));
addpath(genpath('RobustToolbox'));
% NB: addpath, not genpath — SPM compat shims would shadow
% MATLAB builtins; see test.yml for the same rationale.
addpath('spm');
cd CanlabCore/CanlabCore/Unit_tests;
results = canlab_run_all_tests('Walkthroughs', 'only', 'JUnit', fullfile(getenv('GITHUB_WORKSPACE'), 'walkthrough-results.xml'));
if any([results.Failed]); error('CanlabCore:walkthroughs:failed', '%d failed, %d incomplete', sum([results.Failed]), sum([results.Incomplete])); end
- name: Upload walkthrough results
if: always()
uses: actions/upload-artifact@v4
with:
name: walkthrough-results-${{ matrix.matlab-release }}
path: walkthrough-results.xml
if-no-files-found: warn