Skip to content

Commit 2f570b2

Browse files
authored
Merge pull request #1 from FlorianPfaff/github-action
Github-action
2 parents 9b21060 + 559322c commit 2f570b2

File tree

5 files changed

+56
-3
lines changed

5 files changed

+56
-3
lines changed

.github/workflows/tests.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Run MATLAB Tests on GitHub-Hosted Runner
2+
3+
permissions: read-all
4+
5+
on: # yamllint disable-line rule:truthy
6+
push:
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
run-tests:
13+
name: Checkout, Compile and Test
14+
runs-on: ubuntu-latest
15+
permissions:
16+
checks: write
17+
pull-requests: write
18+
19+
steps:
20+
- name: Check out TracksortAlgorithm repository
21+
uses: actions/checkout@v4
22+
with:
23+
submodules: true
24+
25+
- name: List all files up to depth 4
26+
run: |
27+
find . -maxdepth 4
28+
29+
- name: Set up MATLAB
30+
uses: matlab-actions/setup-matlab@v2
31+
with:
32+
products: Image_Processing_Toolbox Statistics_and_Machine_Learning_Toolbox Symbolic_Math_Toolbox Parallel_Computing_Toolbox Deep_Learning_Toolbox
33+
34+
- name: Add lib directory to path and compile
35+
uses: matlab-actions/run-command@v2
36+
with:
37+
command: "addpath(genpath('External/libDirectional')); compileAll;"
38+
39+
- name: Run tests in TracksortAlgorithm/Tests
40+
uses: matlab-actions/run-tests@v2
41+
with:
42+
test-results-junit: test-results/results.xml
43+
code-coverage-cobertura: code-coverage/coverage.xml
44+
select-by-folder: Tests
45+
source-folder: Tracking; External
46+
47+
- name: Publish Unit Test Results
48+
uses: EnricoMi/publish-unit-test-result-action@v2
49+
if: always()
50+
with:
51+
files: test-results/results.xml

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Tests/*.txt
2+
Tests/*.csv

.gitmodules

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
[submodule "Tracking/libDirectional"]
2-
path = Tracking/libDirectional
1+
[submodule "External/libDirectional"]
2+
path = External/libDirectional
33
url = ../../libDirectional/libDirectional.git
44
[submodule "Tracking/AssignmentProblemSolvers/LAPJVMex/lapjv-c"]
55
path = Tracking/AssignmentProblemSolvers/LAPJVMex/lapjv-c

External/libDirectional

Submodule libDirectional added at 9a04311

Tracking/libDirectional

-1
This file was deleted.

0 commit comments

Comments
 (0)