-
Notifications
You must be signed in to change notification settings - Fork 176
57 lines (56 loc) · 1.99 KB
/
tests.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
# This is a basic workflow to help you get started with Actions
name: Tests
# Controls when the action will run.
on: [push, pull_request, workflow_dispatch]
jobs:
test-matlab-stable: #Matlab test Job for supported Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # Checks-out repository under $GITHUB_WORKSPACE
# Install MATLAB
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1
with:
release: R2022b
# Runs test command
- name: Run Tests
uses: matlab-actions/run-command@v1
with:
command: cd test; matRad_runTests
test-matlab-latest: #Matlab test Job for latest Matlab release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3 # Checks-out repository under $GITHUB_WORKSPACE
# Install MATLAB
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1
with:
release: latest
# Runs test command
- name: Run Tests
uses: matlab-actions/run-command@v1
with:
command: cd test; matRad_runTests
test-octave-6: #Octave test Job
runs-on: ubuntu-22.04 # We use Ubuntu-22.04 because it has Octave 6.4
steps:
- uses: actions/checkout@v3 # Checks-out repository under $GITHUB_WORKSPACE
- name: Install OCTAVE
run: |
sudo apt update
sudo apt-get install -y gdb gfortran fonts-freefont-otf gnuplot-x11 libgdcm-dev octave liboctave-dev
- name: Prepare Test Environment
run: |
sudo chmod +x .github/before_install_linux.sh
sudo .github/before_install_linux.sh
- name: Run Tests
run: xvfb-run -a .github/runtests.sh octave-cli
# uses: GabrielBB/xvfb-action@v1 #For Headless tests
# with:
# run: .github/runtests.sh octave-cli
- name: Upload logs if test fails
uses: actions/upload-artifact@v3
if: failure()
with:
name: Test Log
path: runtests.log