Skip to content

Commit b519769

Browse files
Format and update actions (#83)
* add format checks, update actions and deps * sanitize * update contributing.md * update contributing.md * update contributing.md
1 parent 93a39a9 commit b519769

9 files changed

Lines changed: 191 additions & 141 deletions

File tree

.github/workflows/bat.yml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ permissions:
66
jobs:
77
bat:
88
name: Build and Test
9-
runs-on: ubuntu-22.04
9+
runs-on: ubuntu-24.04
1010
steps:
1111
- uses: actions/checkout@v6
1212
- uses: actions/setup-node@v6
1313
with:
1414
node-version: 24
1515
- name: Perform npm tasks
1616
run: npm run ci
17-
- uses: actions/upload-artifact@v5
17+
- uses: actions/upload-artifact@v7
1818
with:
1919
name: built-action
2020
path: |
@@ -29,11 +29,11 @@ jobs:
2929
matrix:
3030
os: [ubuntu-latest, windows-latest, macos-latest, macos-14]
3131
steps:
32-
- uses: actions/download-artifact@v5
32+
- uses: actions/download-artifact@v8
3333
with:
3434
name: built-action
3535
- name: Perform 'setup-matlab'
36-
uses: matlab-actions/setup-matlab@v2
36+
uses: matlab-actions/setup-matlab@v3
3737
with:
3838
products: |
3939
MATLAB_Test
@@ -46,7 +46,7 @@ jobs:
4646
with:
4747
source-folder: sample
4848
startup-options: -logfile output.log
49-
code-coverage-metric-level: mcdc # new option to configure metric level
49+
code-coverage-metric-level: mcdc # new option to configure metric level
5050
- name: Verify option application
5151
run: |
5252
set -e
@@ -60,47 +60,47 @@ jobs:
6060
grep "1 Incomplete" output.log
6161
shell: bash
6262
- name: Generate Model
63-
uses: matlab-actions/run-command@v2
64-
with:
65-
command: cd('sample'),createSampleModel('temp_model'),sltest.testmanager.createTestsFromModel('sltestfile', 'temp_model');
63+
uses: matlab-actions/run-command@v3
64+
with:
65+
command: cd('sample'),createSampleModel('temp_model'),sltest.testmanager.createTestsFromModel('sltestfile', 'temp_model');
6666
- name: Set up diary for logging
6767
run: echo 'diary console.log' >> startup.m
6868
- name: Run run-test command
6969
continue-on-error: true
7070
uses: ./
7171
with:
72-
test-results-simulink-test: test-results/simulinktest.mldatx
73-
model-coverage-cobertura: test-results/modelcoverage.xml
74-
test-results-pdf: test-results/pdf-results.pdf
75-
test-results-junit: test-results/results.xml
76-
code-coverage-cobertura: test-results/coverage.xml
77-
code-coverage-html: test-results/coverageHTML
78-
model-coverage-html: test-results/modelcoverageHTML
79-
test-results-html: test-results/resultsHTML
80-
select-by-folder: sample
81-
strict: true
82-
use-parallel: true
83-
output-detail: Detailed
84-
logging-level: Detailed
72+
test-results-simulink-test: test-results/simulinktest.mldatx
73+
model-coverage-cobertura: test-results/modelcoverage.xml
74+
test-results-pdf: test-results/pdf-results.pdf
75+
test-results-junit: test-results/results.xml
76+
code-coverage-cobertura: test-results/coverage.xml
77+
code-coverage-html: test-results/coverageHTML
78+
model-coverage-html: test-results/modelcoverageHTML
79+
test-results-html: test-results/resultsHTML
80+
select-by-folder: sample
81+
strict: true
82+
use-parallel: true
83+
output-detail: Detailed
84+
logging-level: Detailed
8585
- name: Verify artifacts generation
8686
run: |
87-
(test -f test-results/simulinktest.mldatx) || (echo "File simulinktest.mldatx does not exist" && exit 1)
88-
(test -f test-results/modelcoverage.xml) || (echo "File modelcoverage.xml does not exist" && exit 1)
89-
(test -f test-results/pdf-results.pdf) || (echo "File pdf-results.pdf does not exist" && exit 1)
90-
(test -f test-results/results.xml) || (echo "File results.xml does not exist" && exit 1)
91-
(test -f test-results/coverage.xml) || (echo "File coverage.xml does not exist" && exit 1)
92-
(test -d test-results/coverageHTML) || (echo "Directory coverageHTML does not exist" && exit 1)
93-
(test -f test-results/coverageHTML/*.html) || (echo "No HTML file found" && exit 1)
94-
(test -d test-results/modelcoverageHTML) || (echo "Directory modelcoverageHTML does not exist" && exit 1)
95-
(test -f test-results/modelcoverageHTML/*.html) || (echo "No HTML file found" && exit 1)
96-
(test -d test-results/resultsHTML) || (echo "Directory resultsHTML does not exist" && exit 1)
97-
(test -f test-results/resultsHTML/*.html) || (echo "No HTML file found" && exit 1)
98-
grep -q "runner.addPlugin(FailOnWarningsPlugin())" console.log
99-
grep -q "runInParallel" console.log
100-
grep -q "'OutputDetail', 3" console.log
101-
grep -q "'LoggingLevel', 3" console.log
87+
(test -f test-results/simulinktest.mldatx) || (echo "File simulinktest.mldatx does not exist" && exit 1)
88+
(test -f test-results/modelcoverage.xml) || (echo "File modelcoverage.xml does not exist" && exit 1)
89+
(test -f test-results/pdf-results.pdf) || (echo "File pdf-results.pdf does not exist" && exit 1)
90+
(test -f test-results/results.xml) || (echo "File results.xml does not exist" && exit 1)
91+
(test -f test-results/coverage.xml) || (echo "File coverage.xml does not exist" && exit 1)
92+
(test -d test-results/coverageHTML) || (echo "Directory coverageHTML does not exist" && exit 1)
93+
(test -f test-results/coverageHTML/*.html) || (echo "No HTML file found" && exit 1)
94+
(test -d test-results/modelcoverageHTML) || (echo "Directory modelcoverageHTML does not exist" && exit 1)
95+
(test -f test-results/modelcoverageHTML/*.html) || (echo "No HTML file found" && exit 1)
96+
(test -d test-results/resultsHTML) || (echo "Directory resultsHTML does not exist" && exit 1)
97+
(test -f test-results/resultsHTML/*.html) || (echo "No HTML file found" && exit 1)
98+
grep -q "runner.addPlugin(FailOnWarningsPlugin())" console.log
99+
grep -q "runInParallel" console.log
100+
grep -q "'OutputDetail', 3" console.log
101+
grep -q "'LoggingLevel', 3" console.log
102102
shell: bash
103103
- name: Verify workflow command is added
104104
run: |
105-
grep "::group::TheTruth" output.log
106-
shell: bash
105+
grep "::group::TheTruth" output.log
106+
shell: bash

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
git add package.json package-lock.json
3333
git commit -m "[skip ci] Bump $VERSION"
3434
git push origin HEAD:main
35-
35+
3636
# Now carry on, business as usual
3737
- name: Perform npm tasks
3838
run: npm run ci
@@ -61,15 +61,15 @@ jobs:
6161
6262
# Get the commit of the tag you just released
6363
commitHash=$(git rev-list -n 1 $longVersion)
64-
64+
6565
# Delete the old major and minor version tags locally
6666
git tag -d $majorVersion || true
6767
git tag -d $minorVersion || true
68-
68+
6969
# Make new major and minor version tags locally that point to the commit you got from the "git rev-list" above
7070
git tag -f $majorVersion $commitHash
7171
git tag -f $minorVersion $commitHash
72-
72+
7373
# Force push the new minor version tag to overwrite the old tag remotely
7474
echo "Pushing new tags"
7575
git push -f origin $longVersion

0 commit comments

Comments
 (0)