SCADE Test Actions#
Execute SCADE Test command line tools on models.
Acquire coverage#
The test-coverage
action executes scade.exe -test -mc
on a SCADE Test project for a given configuration.
Input |
Description |
Required |
Default |
---|---|---|---|
scade-dir |
Ansys SCADE installation directory. |
True |
|
test-project |
Path of the SCADE Test project. |
True |
|
configuration |
Configuration to use for generating the code. |
True |
|
results-project |
Path of the SCADE Test Results project. When the project does not exist, it is created, as well as its parent directories, before the tests are executed. |
True |
|
cov-status |
Path of the coverage status to generate. |
False |
|
summary |
Whether to add the status to the job summary. |
False |
true |
checkout |
Whether to clone the repository on the CI/CD machine. |
False |
true |
Output |
Description |
---|---|
results-directory |
Path of the directory containing the model coverage. |
Example#
Acquire coverage basic example
test-coverage:
name: "Acquire coverage basic example"
runs-on: [self-hosted, 'SCADE']
steps:
- name: "Acquire coverage"
uses: ansys/scade-actions/test-coverage@v2.1
with:
scade-dir: 'C:\Program Files\Ansys Inc\v242\SCADE'
test-project: 'Model\CruiseControl.etp'
results-project: 'Coverage\CoverageCruiseControl.etp'
configuration: 'Test'
Execute tests#
The test-execute
action executes scade.exe -test -tee
on a SCADE Test project for a given configuration.
Input |
Description |
Required |
Default |
---|---|---|---|
scade-dir |
Ansys SCADE installation directory. |
True |
|
test-project |
Path of the SCADE Test project. |
True |
|
configuration |
Configuration to use for generating the code. |
True |
|
results-project |
Path of the SCADE Test Results project. When the project does not exist, it is created, as well as its parent directories, before the tests are executed. |
True |
|
junit-report |
Path of the JUnit report to generate. |
False |
|
checkout |
Whether to clone the repository on the CI/CD machine. |
False |
true |
Output |
Description |
---|---|
results-directory |
Path of the directory containing the test results. |
Example#
Execute tests basic example
test-execute:
name: "Execute tests basic example"
runs-on: [self-hosted, 'SCADE']
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Execute tests"
uses: ansys/scade-actions/test-execute@v2.1
with:
scade-dir: 'C:\Program Files\Ansys Inc\v242\SCADE'
test-project: 'model\CruiseControl.etp'
results-project: 'results\ResultsCruiseControl.etp'
configuration: 'Test'
junit-report: 'junit-reports\CruiseControl.xml'
- name: "Publish test report"
uses: mikepenz/action-junit-report@v4
with:
report_paths: './junit-reports/CruiseControl.xml'