Improve use of PhotonAttenuation Package #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run MATLAB Tests on GitHub-Hosted Runner | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
my-job: | |
name: Run MATLAB Tests and Generate Artifacts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Get Photon Attenuation Package | |
run: wget https://uk.mathworks.com/matlabcentral/mlc-downloads/downloads/submissions/12092/versions/7/download/zip/PhotonAttenuation.zip | |
- name: Retrieve necessary file | |
run: unzip PhotonAttenuation.zip PhotonAttenuationQ.m -d src/ | |
- name: Set up MATLAB | |
uses: matlab-actions/setup-matlab@v1 | |
- name: Run tests and generate artifacts | |
uses: matlab-actions/run-tests@v1 | |
with: | |
logging-level: verbose | |
select-by-folder: tests | |
test-results-junit: test-results/results.xml | |
code-coverage-cobertura: code-coverage/coverage.xml | |
- name: Code Coverage Report | |
uses: irongut/CodeCoverageSummary@v1.3.0 | |
with: | |
filename: code-coverage/coverage.xml | |
badge: true | |
fail_below_min: true | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: true | |
indicators: true | |
output: both | |
thresholds: '80 90' |