Skip to content

NGFS Phase 4

NGFS Phase 4 #80

Workflow file for this run

# This is a basic workflow to help you get started with MATLAB Actions
name: MATLAB
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
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@v4
# Sets up MATLAB on the GitHub Actions runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v2
# Runs buildtool, code issues + tests + toolboxPackaging
- name: Run build
uses: matlab-actions/run-build@v2
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: IAMDataExplorer
path: IAMDataExplorer.mltbx
if-no-files-found: ignore
# Set up pages to show reports. This needs to run independent of the previous results.
# Previous here is buildtool, since upload is canceled on failure
- name: Setup Pages
if: success() || failure()
uses: actions/configure-pages@v3
# Upload test reports
- name: Upload Artifact
if: success() || failure()
uses: actions/upload-pages-artifact@v2
with:
# upload entire directory
path: tests/reports
deploy-results:
runs-on: ubuntu-latest
needs: build
if: ${{ always() }}
permissions:
pages: write
id-token: write
environment:
# environment created automatically by GitHub
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
# Deploy reports to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
# Publish the report address to GitHub Pages
- name: Create Annotation with links
run: |
echo '<a href="${{ steps.deployment.outputs.page_url }}/test-results/" target="_blank">Test results report</a>' >> $GITHUB_STEP_SUMMARY
echo '<a href="${{ steps.deployment.outputs.page_url }}/code-coverage/" target="_blank">Code coverage report</a>' >> $GITHUB_STEP_SUMMARY