yaml file updated #9
Workflow file for this run
This file contains hidden or 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: | |
| # Triggers the workflow on push events, but only for the main branch | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| env: | |
| PRODUCT_LIST: MATLAB MATLAB_Test SimBiology Statistics_and_Machine_Learning_Toolbox MATLAB_Compiler | |
| MLM_LICENSE_TOKEN: ${{secrets.MLM_LICENSE_TOKEN}} | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Only allow one build of this type to run at a time | |
| # Ensure results publishing completes without being interrupted/overwritten | |
| concurrency: | |
| group: "test" | |
| cancel-in-progress: false | |
| jobs: | |
| test: | |
| name: Test dev branch | |
| #if: ${{ github.event_name == 'pull_request' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Check out your repository | |
| - uses: actions/checkout@v5 | |
| # Start display server (for UI tests in Linux) | |
| - name: Start display server | |
| run: | | |
| Xvfb :99 & | |
| echo "DISPLAY=:99" >> $GITHUB_ENV | |
| # Set up MATLAB on a GitHub-hosted runner | |
| - name: Setup MATLAB | |
| uses: matlab-actions/setup-matlab@v2 | |
| with: | |
| products: ${{ env.PRODUCT_LIST }} | |
| cache: true | |
| # Run the MATLAB build tool to build and test your code | |
| - name: Run buildtool | |
| uses: matlab-actions/run-build@v2 | |
| with: | |
| tasks: test | |
| build: | |
| name: Deploy/Release (main) | |
| #if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main' ) }} | |
| # Set up URLs for GitHub Pages report | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| # 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: | |
| # Check out your repository | |
| - uses: actions/checkout@v5 | |
| # Start display server (for UI tests in Linux) | |
| - name: Start display server | |
| run: | | |
| Xvfb :99 & | |
| echo "DISPLAY=:99" >> $GITHUB_ENV | |
| # Set up MATLAB on a GitHub-hosted runner | |
| - name: Setup MATLAB | |
| uses: matlab-actions/setup-matlab@v2 | |
| with: | |
| products: ${{ env.PRODUCT_LIST }} | |
| cache: true | |
| # Run the MATLAB build tool to build and test your code | |
| - name: Run buildtool | |
| uses: matlab-actions/run-build@v2 | |
| with: | |
| tasks: compile # change to compile | |
| # Configure GitHub Pages to accept your artifact uploads | |
| - name: Setup Pages | |
| if: always() | |
| uses: actions/configure-pages@v5 | |
| # Upload testing and code coverage reports to your repository | |
| - name: Upload pages | |
| if: always() | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: results # Upload results | |
| # Upload compiled CTF file to deploy Web App | |
| - name: Upload CTF file | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: WebApp_CTF | |
| path: WebAppArchive/*.ctf | |
| # Publish reports to GitHub Pages so they can be viewed in a browser | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| if: always() | |
| uses: actions/deploy-pages@v4 | |
| # ==================================== # | |
| # Alternate ways to run commands in CI # | |
| # ==================================== # | |
| ## Runs your tests using `runtests` command | |
| #- name: Run all tests | |
| # uses: matlab-actions/run-tests@v2 | |
| # with: | |
| # source-folder: code | |
| ## Executes custom MATLAB scripts, functions, or statements | |
| #- name: Run custom testing procedure | |
| # uses: matlab-actions/run-command@v2 | |
| # with: | |
| # command: disp('Running my custom testing procedure!'); addpath('code'); results = runtests('IncludeSubfolders', true); assertSuccess(results); |