Skip to content

Commit

Permalink
added Matlab CI
Browse files Browse the repository at this point in the history
  • Loading branch information
j-emberton committed Dec 6, 2024
1 parent 6a2bc0a commit 940f054
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: MATLAB Pytest Workflow

on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v3

# Step 2: Set up MATLAB (official MATLAB action)
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
release: R2023a # Adjust to the MATLAB version you need

# Step 3: Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9

# Step 4: Install Python MATLAB Engine
- name: Install MATLAB Engine for Python
run: |
cd /usr/local/MATLAB/R2023a/extern/engines/python
python -m pip install --upgrade pip
python setup.py install
# Step 5: Install other Python dependencies
- name: Install dependencies
run: |
pip install -r requirements.txt
# Step 6: Run pytest
- name: Run tests with pytest
run: pytest

0 comments on commit 940f054

Please sign in to comment.