Skip to content

Commit fb78833

Browse files
committed
improving github actions on pull request
1 parent 40e2928 commit fb78833

File tree

3 files changed

+20
-10
lines changed

3 files changed

+20
-10
lines changed

.github/workflows/matlab-agent-tests.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
name: MATLAB Agent Tests
22

33
on:
4-
push:
5-
paths:
6-
- "agents/matlab/**"
7-
- ".github/workflows/matlab-agent-tests.yml"
84
pull_request:
95
paths:
106
- "agents/matlab/**"
7+
- ".github/workflows/matlab-agent-tests.yml"
118

129
jobs:
1310
test:
1411
runs-on: ubuntu-latest
1512
defaults:
1613
run:
17-
working-directory: agents/matlab # directory del progetto Poetry
14+
working-directory: agents/matlab
1815

1916
steps:
2017
- name: Checkout repository
2118
uses: actions/checkout@v4
2219

23-
- name: Set up Python
20+
- name: Set up Python 3.10
2421
uses: actions/setup-python@v5
2522
with:
2623
python-version: "3.10"
@@ -31,13 +28,26 @@ jobs:
3128
curl -sSL https://install.python-poetry.org | python -
3229
env:
3330
POETRY_HOME: ${{ runner.temp }}/poetry
31+
3432
- name: Add Poetry to PATH
3533
run: echo "${{ runner.temp }}/poetry/bin" >> $GITHUB_PATH
3634

37-
- name: Install dependencies (dev incluse)
35+
- name: Install dependencies (dev included)
3836
run: poetry install --with dev
3937

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
4151
run: poetry run pytest
4252

4353
- name: Upload coverage to Codecov

.github/workflows/simulation-bridge-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Simulation Bridge Coverage
22

3-
on: [push, pull_request]
3+
on: [pull_request]
44

55
jobs:
66
coverage:

.github/workflows/simulation-bridge-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Simulation Bridge Lint (pylint & autopep8)
22

3-
on: [pull_request, push]
3+
on: [pull_request]
44

55
jobs:
66
lint:

0 commit comments

Comments
 (0)