Skip to content

Commit

Permalink
Refactor CI workflow for MATLAB build
Browse files Browse the repository at this point in the history
The commit refactors the CI workflow to focus on building MATLAB code. It renames the workflow from "ci" to "MATLAB Build". The workflow is triggered only on push or pull request events for the main branch. Additionally, it adds a manual trigger option in the Actions tab.

Significant changes include:
- Renaming the workflow
- Restricting triggers to main branch
- Adding a manual trigger option
- Setting up MATLAB on GitHub Actions runner
- Running tests using sorotoki command
  • Loading branch information
BJCaasenbrood committed Oct 4, 2023
1 parent 20c0ef3 commit eaf2830
Showing 1 changed file with 32 additions and 11 deletions.
43 changes: 32 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,40 @@
name: ci
name: MATLAB Build

# 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
- main
permissions:
contents: write
branches: [ main ]
pull_request:
branches: [ main ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
deploy:
# 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@v3
- uses: actions/setup-python@v4

# 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 all tests
uses: matlab-actions/run-command@v1
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
command: sorotoki -i --approve; sorotoki -b --approve; y = sorotoki('-t');
# source-folder: code

# You can use "run-command" to execute custom MATLAB scripts, functions, or statements.
#- name: Run custom testing procedure
# uses: matlab-actions/run-command@v1
# with:
# command: disp('Running my custom testing procedure!'); addpath('code'); results = runtests('IncludeSubfolders', true); assertSuccess(results);

0 comments on commit eaf2830

Please sign in to comment.