diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e60652b..9d6cc5b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: - name: Run default build tool task uses: matlab-actions/run-build@v1 with: - tasks: test + tasks: clean test # You can use "run-command" to execute custom MATLAB scripts, functions, or statements. #- name: Run custom testing procedure diff --git a/buildfile.m b/buildfile.m index e5f0243d..f271084e 100644 --- a/buildfile.m +++ b/buildfile.m @@ -14,13 +14,17 @@ % Set default task plan.DefaultTasks = "test"; +% Make the "test" task dependent on the "setUp" task plan("clean") = CleanTask; plan("test").Dependencies = "setUp"; end function setUpTask(context) + +% Add source code folder to path srcFolder = fullfile(context.Plan.RootFolder, "code"); addpath(srcFolder); + end