|
1 | 1 | name: Python Tests |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: ["**"] |
6 | | - pull_request: |
7 | | - workflow_dispatch: {} |
| 4 | + push: |
| 5 | + branches: ["**"] |
| 6 | + paths: |
| 7 | + - MCPForUnity/UnityMcpServer~/src/** |
| 8 | + - .github/workflows/python-tests.yml |
| 9 | + pull_request: |
| 10 | + paths: |
| 11 | + - MCPForUnity/UnityMcpServer~/src/** |
| 12 | + - .github/workflows/python-tests.yml |
| 13 | + workflow_dispatch: {} |
8 | 14 |
|
9 | 15 | 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 | + test: |
| 17 | + name: Run Python Tests |
| 18 | + runs-on: ubuntu-latest |
| 19 | + steps: |
| 20 | + - name: Checkout repository |
| 21 | + uses: actions/checkout@v4 |
16 | 22 |
|
17 | | - - name: Install uv |
18 | | - uses: astral-sh/setup-uv@v4 |
19 | | - with: |
20 | | - version: "latest" |
| 23 | + - name: Install uv |
| 24 | + uses: astral-sh/setup-uv@v4 |
| 25 | + with: |
| 26 | + version: "latest" |
21 | 27 |
|
22 | | - - name: Set up Python |
23 | | - run: uv python install 3.10 |
| 28 | + - name: Set up Python |
| 29 | + run: uv python install 3.10 |
24 | 30 |
|
25 | | - - name: Install dependencies |
26 | | - run: | |
27 | | - cd MCPForUnity/UnityMcpServer~/src |
28 | | - uv sync --dev |
| 31 | + - name: Install dependencies |
| 32 | + run: | |
| 33 | + cd MCPForUnity/UnityMcpServer~/src |
| 34 | + uv sync |
| 35 | + uv pip install -e ".[dev]" |
29 | 36 |
|
30 | | - - name: Run tests |
31 | | - run: | |
32 | | - cd MCPForUnity/UnityMcpServer~/src |
33 | | - uv run pytest tests/ -v --tb=short |
| 37 | + - name: Run tests |
| 38 | + run: | |
| 39 | + cd MCPForUnity/UnityMcpServer~/src |
| 40 | + uv run pytest tests/ -v --tb=short |
34 | 41 |
|
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/ |
| 42 | + - name: Upload test results |
| 43 | + uses: actions/upload-artifact@v4 |
| 44 | + if: always() |
| 45 | + with: |
| 46 | + name: pytest-results |
| 47 | + path: | |
| 48 | + MCPForUnity/UnityMcpServer~/src/.pytest_cache/ |
| 49 | + tests/ |
0 commit comments