Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions .github/actions/check-code/action.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/actions/install-matbox/action.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/actions/install-matbox/installMatBox.m

This file was deleted.

44 changes: 0 additions & 44 deletions .github/actions/push-badges/action.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/actions/test-code/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/badges/code_issues.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion .github/badges/tests.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 0 additions & 49 deletions .github/workflows/reusable_check_code.yml

This file was deleted.

87 changes: 0 additions & 87 deletions .github/workflows/reusable_test_workflow.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ concurrency:
jobs:
call-workflow-test-toolbox:
name: Test toolbox code
uses: ehennestad/matbox/.github/workflows/reusable_test_workflow.yml@v0.9
uses: ehennestad/matbox-actions/.github/workflows/test-code-workflow.yml@v1
with:
source_directory: code
tests_directory: tools/tests
tools_directory: tools
matlab_use_cache: true
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
27 changes: 27 additions & 0 deletions code/+matbox/+tasks/+internal/createBadge.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
function createBadge(label, message, color, projectRootDirectory)
% createBadge - Write a badge as JSON or as a legacy SVG file
%
% Writes a badge description as a JSON file (docs/reports/badges) when
% the MATBOX_BADGE_FORMAT environment variable is set to "json". The
% matbox-actions workflows set this variable and render the JSON files
% to SVG badges with badge-maker.
%
% Otherwise falls back to rendering the SVG in MATLAB via the deprecated
% pybadges Python package, for callers without a render step: local runs
% and repositories pinned to older matbox-actions versions. This
% fallback will be removed in a future major release.

arguments
label (1,1) string
message (1,1) string
color (1,1) string
projectRootDirectory (1,1) string {mustBeFolder}
end

if strcmpi(getenv("MATBOX_BADGE_FORMAT"), "json")
matbox.utility.writeBadgeJSONFile(label, message, color, ...
"OutputFolder", fullfile(projectRootDirectory, "docs", "reports", "badges"))
else
matbox.utility.createBadgeSvg(label, message, color, projectRootDirectory)
end
end
2 changes: 1 addition & 1 deletion code/+matbox/+tasks/codecheckToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function createCodeIssuesBadge(issueCount, projectRootDir)
color = "red";
end

matbox.utility.createBadgeSvg("code issues", ...
matbox.tasks.internal.createBadge("code issues", ...
string(issueCount.Total), color, projectRootDir)
end

Expand Down
2 changes: 1 addition & 1 deletion code/+matbox/+tasks/testToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function createTestResultBadge(results, projectRootDirectory)
color = "red";
message = sprintf("%d/%d passed", numPassedTests, numTests);
end
matbox.utility.createBadgeSvg("tests", message, color, projectRootDirectory)
matbox.tasks.internal.createBadge("tests", message, color, projectRootDirectory)
end

function displayTestResultSummary(testResults)
Expand Down
Loading