forked from fluxnet/ONEFlux
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.05 KB
/
test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: MATLAB Pytest Workflow
on:
pull_request:
branches:
- ustar_cp_refactor_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