Skip to content

Commit 1f01b03

Browse files
Update bat.yml
1 parent 9334c18 commit 1f01b03

1 file changed

Lines changed: 21 additions & 9 deletions

File tree

.github/workflows/bat.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,61 @@
11
name: Build and Test
22
on: [push]
3+
permissions:
4+
contents: read
35

46
jobs:
57
bat:
68
name: Build and Test
79
runs-on: ubuntu-22.04
810
steps:
9-
- uses: actions/checkout@v4
10-
11-
- uses: actions/setup-node@v4
11+
- uses: actions/checkout@v5
12+
- uses: actions/setup-node@v5
1213
with:
1314
node-version: 20
1415
- name: Perform npm tasks
1516
run: npm run ci
17+
- uses: actions/upload-artifact@v4
18+
with:
19+
name: built-action
20+
path: |
21+
**/*
22+
!node_modules/
1623
24+
integ:
25+
needs: bat
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
os: [ubuntu-latest, windows-latest, macos-latest, macos-14]
31+
steps:
32+
- uses: actions/download-artifact@v5
33+
with:
34+
name: built-action
1735
- name: Perform 'setup-matlab'
1836
uses: matlab-actions/setup-matlab@v2
1937
with:
2038
products: |
2139
Simulink
2240
Simulink_Test
2341
Simulink_Coverage
24-
2542
- name: Run MATLAB Tests
2643
uses: ./
2744
with:
2845
source-folder: sample
2946
startup-options: -logfile output.log
30-
3147
- name: Verify option application
3248
run: |
3349
set -e
3450
grep "Running TheTruth" output.log
3551
grep "Done TheTruth" output.log
3652
grep "1 Passed" output.log
37-
3853
- name: Generate Model
3954
uses: matlab-actions/run-command@v2
4055
with:
4156
command: cd('sample'),createSampleModel('temp_model'),sltest.testmanager.createTestsFromModel('sltestfile', 'temp_model');
42-
4357
- name: Set up diary for logging
4458
run: echo 'diary console.log' >> startup.m
45-
4659
- name: Run run-test command
4760
uses: ./
4861
with:
@@ -54,7 +67,6 @@ jobs:
5467
use-parallel: true
5568
output-detail: Detailed
5669
logging-level: Detailed
57-
5870
- name: Verify artifacts generation
5971
run: |
6072
(test -f test-results/simulinktest.mldatx) || (echo "File simulinktest.mldatx does not exist" && exit 1)

0 commit comments

Comments
 (0)