-
Notifications
You must be signed in to change notification settings - Fork 3
Github Actions #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Github Actions #27
Changes from all commits
9e1d83c
4a31c75
40e2928
fb78833
03eda77
755327a
768eaba
0198678
cc36790
a831070
7b26975
48233aa
73653a7
f4164a5
821c9ac
9018115
9ff193b
dce7038
767025d
dff27cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: MATLAB Agent CI | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "agents/matlab/**" | ||
- ".github/workflows/matlab-agent-ci.yml" | ||
|
||
jobs: | ||
ci: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
# All commands run inside the agent directory | ||
defaults: | ||
run: | ||
working-directory: agents/matlab | ||
|
||
steps: | ||
# ───── 1. Checkout ───── | ||
- uses: actions/checkout@v4 | ||
|
||
# ───── 2. Python + Poetry ───── | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install Poetry | ||
env: | ||
POETRY_HOME: ${{ runner.temp }}/poetry | ||
run: | | ||
python -m pip install --upgrade pip | ||
curl -sSL https://install.python-poetry.org | python - | ||
|
||
- name: Add Poetry to PATH (Linux/macOS) | ||
if: runner.os != 'Windows' | ||
run: echo "${{ runner.temp }}/poetry/bin" >> $GITHUB_PATH | ||
|
||
- name: Add Poetry to PATH (Windows) | ||
if: runner.os == 'Windows' | ||
shell: pwsh | ||
run: echo "${{ runner.temp }}\poetry\bin" | | ||
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 | ||
|
||
# ───── 3. Install dev deps once ───── | ||
- name: Install dev dependencies | ||
run: poetry install --with dev | ||
|
||
# ───── 4. Format check (non-blocking, Linux only) ───── | ||
- name: Check formatting (non-blocking) | ||
if: matrix.os == 'ubuntu-latest' | ||
continue-on-error: true | ||
run: poetry run autopep8 --recursive --diff matlab_agent | ||
|
||
# ───── 5. Lint (Linux only) ───── | ||
- name: Run pylint (min score 8.0) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: poetry run pylint matlab_agent --fail-under=8 | ||
|
||
# ───── 6. Tests ───── | ||
# - name: Run pytest with coverage (Linux) | ||
# if: matrix.os == 'ubuntu-latest' | ||
# run: poetry run pytest | ||
|
||
# - name: Upload coverage to Codecov | ||
# if: matrix.os == 'ubuntu-latest' | ||
# uses: codecov/codecov-action@v5 | ||
# with: | ||
# files: coverage.xml | ||
# fail_ci_if_error: true | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
# - name: Run pytest (no coverage) | ||
# if: matrix.os != 'ubuntu-latest' | ||
# run: poetry run pytest -q | ||
|
||
# ───── 7. Build + dist artefacts (Linux only) ───── | ||
- name: Install runtime dependencies | ||
if: matrix.os == 'ubuntu-latest' | ||
run: poetry install --only main | ||
|
||
- name: Build wheel and sdist | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
poetry build --format wheel | ||
poetry build --format sdist | ||
|
||
- name: Upload dist artefacts | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: matlab-agent-dist | ||
path: | | ||
agents/matlab/dist/*.whl | ||
agents/matlab/dist/*.tar.gz | ||
retention-days: 1 # minimum allowed (≈24 h) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Simulation Bridge CI | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "simulation_bridge/**" | ||
- ".github/workflows/simulation-bridge-ci.yml" | ||
|
||
jobs: | ||
ci: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
# ───── 1. Checkout ───── | ||
- uses: actions/checkout@v4 | ||
|
||
# ───── 2. Python + Poetry ───── | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install Poetry | ||
env: | ||
POETRY_HOME: ${{ runner.temp }}/poetry | ||
run: | | ||
python -m pip install --upgrade pip | ||
curl -sSL https://install.python-poetry.org | python - | ||
|
||
- name: Add Poetry to PATH (Linux/macOS) | ||
if: runner.os != 'Windows' | ||
run: echo "${{ runner.temp }}/poetry/bin" >> $GITHUB_PATH | ||
|
||
- name: Add Poetry to PATH (Windows) | ||
if: runner.os == 'Windows' | ||
shell: pwsh | ||
run: echo "${{ runner.temp }}\poetry\bin" | | ||
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 | ||
|
||
# ───── 3. Install deps once ───── | ||
- name: Install dev dependencies | ||
run: poetry install --with dev | ||
|
||
# ───── 4. Format (non-blocking, Linux only) ───── | ||
- name: Check formatting (non-blocking) | ||
if: matrix.os == 'ubuntu-latest' | ||
continue-on-error: true | ||
run: poetry run autopep8 --recursive --diff simulation_bridge | ||
|
||
# ───── 5. Lint (Linux only) ───── | ||
- name: Run pylint (min score 8.0) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: poetry run pylint simulation_bridge --fail-under=8 | ||
|
||
# ───── 6. Tests ───── | ||
- name: Run pytest with coverage (Linux) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: poetry run pytest | ||
|
||
- name: Upload coverage to Codecov | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
files: coverage.xml | ||
fail_ci_if_error: true | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- name: Run pytest (no coverage) | ||
if: matrix.os != 'ubuntu-latest' | ||
run: poetry run pytest -q | ||
|
||
# ───── 7. Build + dist artefacts (Linux only) ───── | ||
- name: Install runtime dependencies | ||
if: matrix.os == 'ubuntu-latest' | ||
run: poetry install --only main | ||
|
||
- name: Build wheel and sdist | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
poetry build --format wheel | ||
poetry build --format sdist | ||
|
||
- name: Upload dist artefacts | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: actions/upload-artifact@v4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please remember to set expiration time of one hour for the artifacts. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One hour isn’t supported, so the shortest possible setting is 1 day |
||
with: | ||
name: simulation-bridge-dist | ||
path: | | ||
dist/*.whl | ||
dist/*.tar.gz | ||
retention-days: 1 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
[pytest] | ||
testpaths = simulation_bridge/test/ | ||
addopts = --cov=simulation_bridge --cov-branch --cov-report=xml:coverage.xml |
Uh oh!
There was an error while loading. Please reload this page.