Skip to content

Commit 5e20bcb

Browse files
committed
chore: add GitHub Actions workflow for Python tests
- Configured automated testing on push and pull requests using pytest - Set up uv for dependency management and Python 3.10 environment - Added test results artifact upload for debugging failed runs
1 parent 13274c9 commit 5e20bcb

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/python-tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Python Tests
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
workflow_dispatch: {}
8+
9+
jobs:
10+
test:
11+
name: Run Python Tests
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v4
19+
with:
20+
version: "latest"
21+
22+
- name: Set up Python
23+
run: uv python install 3.10
24+
25+
- name: Install dependencies
26+
run: |
27+
cd MCPForUnity/UnityMcpServer~/src
28+
uv sync --dev
29+
30+
- name: Run tests
31+
run: |
32+
cd MCPForUnity/UnityMcpServer~/src
33+
uv run pytest tests/ -v --tb=short
34+
35+
- name: Upload test results
36+
uses: actions/upload-artifact@v4
37+
if: always()
38+
with:
39+
name: pytest-results
40+
path: |
41+
MCPForUnity/UnityMcpServer~/src/.pytest_cache/
42+
tests/

0 commit comments

Comments
 (0)