Skip to content

Commit 8b88730

Browse files
committed
Modify CI
1 parent 02660b4 commit 8b88730

24 files changed

+345
-191
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
branches: [ release ]
99
workflow_dispatch:
1010

11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
1116
jobs:
1217
test:
1318
strategy:
@@ -32,23 +37,21 @@ jobs:
3237
uses: matlab-actions/setup-matlab@v2
3338
with:
3439
release: ${{ matrix.MATLABVersion }}
35-
products: Simulink Signal_Processing_Toolbox Symbolic_Math_Toolbox
3640

3741
# Run all the tests
3842
- name: Run SmokeTests
3943
uses: matlab-actions/run-command@v2
4044
with:
41-
command: openProject(pwd); RunAllTests(true);
45+
command: openProject(pwd); RunAllTests;
4246

4347
# Upload the test results as artifact
4448
- name: Upload TestResults
4549
uses: actions/upload-artifact@v4
4650
with:
4751
name: TestResults_${{ matrix.MATLABVersion }}
48-
path: ./SoftwareTests/TestResults_${{ matrix.MATLABVersion }}.txt
52+
path: ./public/*
4953
overwrite: true
5054

51-
5255
badge:
5356
if: ${{ always() }}
5457
needs: [test]
@@ -60,7 +63,7 @@ jobs:
6063
# Checks-out your repository
6164
- uses: actions/checkout@v4
6265

63-
# Sets up R2024b
66+
# Sets up R2023b
6467
- name: Setup MATLAB
6568
uses: matlab-actions/setup-matlab@v2
6669
with:
@@ -70,15 +73,25 @@ jobs:
7073
- name: Download All TestResults
7174
uses: actions/download-artifact@v4
7275
with:
73-
path: SoftwareTests
76+
path: public
7477
pattern: TestResults_*
7578
merge-multiple: true
76-
79+
7780
# Create the test results badge
78-
- name: Run CreateBadge
81+
- name: Run PostSmokeTest
7982
uses: matlab-actions/run-command@v2
8083
with:
81-
command: openProject(pwd); CreateBadge;
84+
command: openProject(pwd); PostSmokeTest;
85+
86+
- name: Setup Pages
87+
uses: actions/configure-pages@v5
88+
- name: Upload pages artifact
89+
uses: actions/upload-pages-artifact@v3
90+
with:
91+
path: public
92+
- name: Deploy to GitHub Pages
93+
id: deployment
94+
uses: actions/deploy-pages@v4
8295

8396
# Commit the JSON for the MATLAB releases badge
8497
- name: Commit changed files

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The instructions inside the live scripts will guide you through the exercises an
2525

2626
## Contact Us
2727

28-
Solutions are available upon instructor request. Contact the [MathWorks teaching resources team](mailto:[email protected]) if you would like to request solutions, provide feedback, or if you have a question.
28+
Contact the [MathWorks teaching resources team](mailto:[email protected]) if you would like to request solutions, provide feedback, or if you have a question.
2929

3030
<a name="H_30BC7141"></a>
3131

README.mlx

-31 Bytes
Binary file not shown.

Scripts/FilteringIntro.mlx

3 Bytes
Binary file not shown.

SoftwareTests/CheckTestResults.m

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
end
55

66
properties (ClassSetupParameter)
7-
Project = {''};
7+
Project = {currentProject()};
88
end
99

1010
properties (TestParameter)
@@ -15,8 +15,8 @@
1515
methods (TestParameterDefinition,Static)
1616

1717
function Version = GetResults(Project)
18-
RootFolder = currentProject().RootFolder;
19-
Version = dir(fullfile(RootFolder,"SoftwareTests","TestResults*.txt"));
18+
RootFolder = Project.RootFolder;
19+
Version = dir(fullfile(RootFolder,"public","TestResults*.txt"));
2020
Version = extractBetween([Version.name],"TestResults_",".txt");
2121
end
2222

@@ -37,9 +37,11 @@ function SetUpSmokeTest(testCase,Project)
3737
methods(Test)
3838

3939
function CheckResults(testCase,Version)
40-
File = fullfile("SoftwareTests","TestResults_"+Version+".txt");
40+
File = fullfile("public","TestResults_"+Version+".txt");
4141
Results = readtable(File,TextType="string");
42-
testCase.verifyTrue(all(Results.Passed));
42+
if ~all(Results.Passed)
43+
error("Some of the tests did not pass.")
44+
end
4345
end
4446

4547
end

SoftwareTests/CreateBadge.m

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
% Post-run script for AnalogToDigitalConversionSoln.mlx
2+
% ---- Post-run commands -----
3+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
% Post-run script for BuildFilteringAppSoln.mlx
2+
% ---- Post-run commands -----
3+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
% Post-run script for FilterDesignSoln.mlx
2+
% ---- Post-run commands -----
3+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
% Post-run script for FilteringIntroSoln.mlx
2+
% ---- Post-run commands -----
3+

0 commit comments

Comments
 (0)