-
Notifications
You must be signed in to change notification settings - Fork 323
45 lines (37 loc) · 1.11 KB
/
testAllCI_step1.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: cobratoolboxCI (merge, test, and upload)
on:
pull_request:
branches:
- develop
- master
types: [opened, synchronize, reopened]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: self-hosted
steps:
- name: Check out merged PR code
uses: actions/checkout@v4
- name: Run MATLAB Tests
run: |
matlab -batch "run('initCobraToolbox.m'); run('test/testAll.m');"
- name: Convert JUnit to CTRF
run: |
npx junit-to-ctrf ./testReport.junit.xml -o ./ctrf/ctrf-report.json
- name: Upload CTRF Artifact
uses: actions/upload-artifact@v4
with:
name: testReport
path: ./ctrf/ctrf-report.json
- name: Save PR Number
run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
- name: Upload PR Number as Artifact
run: echo $PR_NUMBER > pr_number.txt
shell: bash
- name: Upload PR Number Artifact
uses: actions/upload-artifact@v4
with:
name: pr_number
path: pr_number.txt