Build updates #233
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
# This is a basic workflow to help you get started with MATLAB Actions | |
name: MATLAB Build | |
# Controls when the action will run. | |
on: | |
push: # Runs on push events | |
pull_request: # Runs on pull requests | |
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Start display server | |
run: | | |
sudo apt-get install xvfb | |
Xvfb :99 & | |
echo "DISPLAY=:99" >> $GITHUB_ENV | |
# Sets up MATLAB on the GitHub Actions runner | |
- name: Setup MATLAB | |
uses: matlab-actions/setup-matlab@v1 | |
# Runs a set of commands using the runners shell | |
- name: Run toolbox build | |
uses: matlab-actions/run-build@v1 | |
# Runs a set of commands using the runners shell | |
- name: Run all tests | |
uses: matlab-actions/run-tests@v1 | |
with: | |
source-folder: . | |
test-results-pdf: artifacts/report/test-report.pdf | |
test-results-junit: artifacts/results/test-results.xml | |
code-coverage-cobertura: artifacts/coverage/coverage.xml | |
- name: Upload Test Report | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
# Artifact name | |
name: Test Report | |
# A file, directory or wildcard pattern that describes what to upload | |
path: artifacts/report/test-report.pdf | |
- name: Upload Test Results | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
# Artifact name | |
name: Test Report | |
# A file, directory or wildcard pattern that describes what to upload | |
path: artifacts/results/test-results.xml | |
- name: Upload Test Coverage | |
uses: actions/upload-artifact@v3 | |
with: | |
# Artifact name | |
name: Test Coverage | |
# A file, directory or wildcard pattern that describes what to upload | |
path: artifacts/coverage/coverage.xml |