Skip to content

switch to different test publishing action #512

switch to different test publishing action

switch to different test publishing action #512

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Tests
permissions:
checks: write
pull-requests: write
# 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@v4 # Checks-out repository under $GITHUB_WORKSPACE
- name: Get MOxUnit
uses: actions/checkout@v4
with:
repository: MOxUnit/MOxUnit
path: MOxUnit
# Install MATLAB
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2022b
products: Image_Processing_Toolbox
# Runs test command
- name: Run Tests
uses: matlab-actions/run-command@v2
with:
command: back=cd('MOxUnit/MOxUnit'); moxunit_set_path; cd(back); matRad_rc; moxunit_runtests('test','-junit_xml_file','testresults.xml'); exit(double(~ans))
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: success() || failure()
with:
files: *.xml

Check failure on line 34 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 34
test-matlab-latest: #Matlab test Job for latest Matlab release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # Checks-out repository under $GITHUB_WORKSPACE
- name: Get MOxUnit
uses: actions/checkout@v4
with:
repository: MOxUnit/MOxUnit
path: MOxUnit
# Install MATLAB
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: latest
products: Image_Processing_Toolbox
# Runs test command
- name: Run Tests
uses: matlab-actions/run-command@v2
with:
command: back=cd("MOxUnit/MOxUnit"); moxunit_set_path; cd(back); matRad_rc; moxunit_runtests('test','-junit_xml_file','testresults.xml'); exit(double(~ans))
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: success() || failure()
with:
files: *.xml
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@v4 # Checks-out repository under $GITHUB_WORKSPACE
- name: Get MOxUnit
uses: actions/checkout@v4
with:
repository: MOxUnit/MOxUnit
path: MOxUnit
- 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@v4
if: failure()
with:
name: Test Log
path: runtests.log
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: success() || failure()
with:
files: *.xml