1
1
name : MATLAB Agent Tests
2
2
3
3
on :
4
- push :
5
- paths :
6
- - " agents/matlab/**"
7
- - " .github/workflows/matlab-agent-tests.yml"
8
4
pull_request :
9
5
paths :
10
6
- " agents/matlab/**"
7
+ - " .github/workflows/matlab-agent-tests.yml"
11
8
12
9
jobs :
13
10
test :
14
11
runs-on : ubuntu-latest
15
12
defaults :
16
13
run :
17
- working-directory : agents/matlab # directory del progetto Poetry
14
+ working-directory : agents/matlab
18
15
19
16
steps :
20
17
- name : Checkout repository
21
18
uses : actions/checkout@v4
22
19
23
- - name : Set up Python
20
+ - name : Set up Python 3.10
24
21
uses : actions/setup-python@v5
25
22
with :
26
23
python-version : " 3.10"
@@ -31,13 +28,26 @@ jobs:
31
28
curl -sSL https://install.python-poetry.org | python -
32
29
env :
33
30
POETRY_HOME : ${{ runner.temp }}/poetry
31
+
34
32
- name : Add Poetry to PATH
35
33
run : echo "${{ runner.temp }}/poetry/bin" >> $GITHUB_PATH
36
34
37
- - name : Install dependencies (dev incluse )
35
+ - name : Install dependencies (dev included )
38
36
run : poetry install --with dev
39
37
40
- - name : Run pytest (unit + integration) con coverage
38
+ - name : Inject dummy matlab.engine stub (CI only)
39
+ run : |
40
+ python - <<'PY'
41
+ import types, sys
42
+ # Create empty 'matlab' and 'matlab.engine' modules
43
+ matlab_mod = types.ModuleType("matlab")
44
+ engine_mod = types.ModuleType("matlab.engine")
45
+ matlab_mod.engine = engine_mod
46
+ sys.modules["matlab"] = matlab_mod
47
+ sys.modules["matlab.engine"] = engine_mod
48
+ PY
49
+
50
+ - name : Run pytest (unit + integration) with coverage
41
51
run : poetry run pytest
42
52
43
53
- name : Upload coverage to Codecov
0 commit comments