Skip to content

Commit b478ede

Browse files
authored
Migrate from TravisCI to GitHub actions (#514)
* create github action for testing * Update tests.yml * change permissions for linux MCsquare within git directly * Update tests.yml Add Octave Testing * Update tests.yml Headless tests with respective GitHub Action * Update tests.yml Some streamlining and Artifact Upload on failure for Octave tests
1 parent 0efba94 commit b478ede

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/tests.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This is a basic workflow to help you get started with Actions
2+
name: Testing
3+
# Controls when the action will run.
4+
on: [push, pull_request, workflow_dispatch]
5+
jobs:
6+
test-matlab: #Matlab test Job
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2 # Checks-out repository under $GITHUB_WORKSPACE
10+
# Install MATLAB
11+
- name: Install MATLAB
12+
uses: matlab-actions/setup-matlab@v1
13+
# Runs test command
14+
- name: Run Tests
15+
uses: matlab-actions/run-command@v1
16+
with:
17+
command: cd unitTest; matRad_runTests
18+
test-octave: #Octave test Job
19+
runs-on: ubuntu-20.04 # We use Ubuntu-20.04 because it has Octave 5.2
20+
steps:
21+
- uses: actions/checkout@v2 # Checks-out repository under $GITHUB_WORKSPACE
22+
- name: Install OCTAVE
23+
run: sudo apt-get install -y gdb gfortran fonts-freefont-otf gnuplot-x11 libgdcm-dev octave liboctave-dev
24+
- name: Prepare Test Environment
25+
run: |
26+
sudo chmod +x .travis/before_install_linux.sh
27+
sudo .travis/before_install_linux.sh
28+
- name: Run Tests
29+
uses: GabrielBB/xvfb-action@v1 #For Headless tests
30+
with:
31+
run: .travis/runtests.sh octave-cli
32+
- name: Upload Logs if failure
33+
uses: actions/upload-artifact@v2
34+
if: failure()
35+
with:
36+
name: Test Log
37+
path: runtests.log
38+

MCsquare/bin/MCsquare_linux

100644100755
File mode changed.

0 commit comments

Comments
 (0)