11# This is a basic workflow to help you get started with Actions
22name : Tests
3+
4+ permissions :
5+ checks : write
6+ pull-requests : write
7+ actions : read
8+ contents : read
9+
310# Controls when the action will run.
411on : [push, pull_request, workflow_dispatch]
512jobs :
613 test-matlab-stable : # Matlab test Job for supported Release
714 runs-on : ubuntu-latest
815 steps :
9- - uses : actions/checkout@v3 # Checks-out repository under $GITHUB_WORKSPACE
10- # Install MATLAB
11- - name : Install MATLAB
12- uses : matlab-actions/setup-matlab@v1
16+ - uses : actions/checkout@v4 # Checks-out repository under $GITHUB_WORKSPACE
1317 with :
14- release : R2022b
15- # Runs test command
16- - name : Run Tests
17- uses : matlab-actions/run-command@v1
18+ submodules : ' true'
19+ - name : Run Test
20+ uses : ./.github/actions/test-matlab
1821 with :
19- command : cd unitTest; matRad_runTests
22+ matlab-version : R2022b
23+
2024 test-matlab-latest : # Matlab test Job for latest Matlab release
2125 runs-on : ubuntu-latest
2226 steps :
23- - uses : actions/checkout@v3 # Checks-out repository under $GITHUB_WORKSPACE
24- # Install MATLAB
25- - name : Install MATLAB
26- uses : matlab-actions/setup-matlab@v1
27+ - uses : actions/checkout@v4 # Checks-out repository under $GITHUB_WORKSPACE
2728 with :
28- release : latest
29- # Runs test command
30- - name : Run Tests
31- uses : matlab-actions/run-command@v1
29+ submodules : ' true'
30+ - uses : ./.github/actions/test-matlab
3231 with :
33- command : cd unitTest; matRad_runTests
32+ matlab-version : latest
33+
3434 test-octave-6 : # Octave test Job
3535 runs-on : ubuntu-22.04 # We use Ubuntu-22.04 because it has Octave 6.4
3636 steps :
37- - uses : actions/checkout@v3 # Checks-out repository under $GITHUB_WORKSPACE
38- - name : Install OCTAVE
39- run : |
40- sudo apt update
41- sudo apt-get install -y gdb gfortran fonts-freefont-otf gnuplot-x11 libgdcm-dev octave liboctave-dev
42- - name : Prepare Test Environment
43- run : |
44- sudo chmod +x .github/before_install_linux.sh
45- sudo .github/before_install_linux.sh
46- - name : Run Tests
47- run : xvfb-run -a .github/runtests.sh octave-cli
48- # uses: GabrielBB/xvfb-action@v1 #For Headless tests
49- # with:
50- # run: .github/runtests.sh octave-cli
51- - name : Upload logs if test fails
52- uses : actions/upload-artifact@v3
53- if : failure()
37+ - uses : actions/checkout@v4 # Checks-out repository under $GITHUB_WORKSPACE
5438 with :
55- name : Test Log
56- path : runtests.log
57-
39+ submodules : ' true'
40+ - uses : ./.github/actions/test-octave
41+
42+ test-report :
43+ name : Collect Test Results
44+ needs : [test-matlab-stable, test-matlab-latest, test-octave-6]
45+ uses : ./.github/workflows/test-results.yml
46+ secrets : inherit
47+
48+ coverage-report :
49+ name : Collect Coverage Report
50+ needs : [test-matlab-stable]
51+ uses : ./.github/workflows/coverage-report.yml
52+ secrets : inherit
0 commit comments