|
1 | | -name: CI |
| 1 | +name: Integration Tests |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
|
7 | 7 | branches: [main] |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - lint: |
11 | | - name: Lint & Type Check |
12 | | - runs-on: ubuntu-latest |
13 | | - steps: |
14 | | - - uses: actions/checkout@v4 |
15 | | - |
16 | | - - uses: actions/setup-python@v5 |
17 | | - with: |
18 | | - python-version: "3.12" |
19 | | - |
20 | | - - name: Install dependencies |
21 | | - run: | |
22 | | - python -m pip install --upgrade pip |
23 | | - pip install -e ".[dev]" |
24 | | -
|
25 | | - - name: Ruff check |
26 | | - run: ruff check . |
27 | | - |
28 | | - - name: Ruff format check |
29 | | - run: ruff format --check . |
30 | | - |
31 | | - - name: isort check |
32 | | - run: isort --check . |
33 | | - |
34 | | - - name: Pyright |
35 | | - run: pyright |
36 | | - |
37 | | - test-unit: |
38 | | - name: Unit Tests (Python ${{ matrix.python-version }}) |
39 | | - runs-on: ubuntu-latest |
40 | | - strategy: |
41 | | - matrix: |
42 | | - python-version: ["3.12", "3.13"] |
43 | | - steps: |
44 | | - - uses: actions/checkout@v4 |
45 | | - |
46 | | - - uses: actions/setup-python@v5 |
47 | | - with: |
48 | | - python-version: ${{ matrix.python-version }} |
49 | | - |
50 | | - - name: Install dependencies |
51 | | - run: | |
52 | | - python -m pip install --upgrade pip |
53 | | - pip install -e ".[dev]" |
54 | | -
|
55 | | - - name: Run unit tests |
56 | | - run: pytest tests/ -v --ignore=tests/integration/ |
57 | | - |
58 | 10 | test-integration: |
59 | | - name: Integration Tests (NC ${{ matrix.nextcloud-version }}) |
| 11 | + name: NC ${{ matrix.nextcloud-version }} |
60 | 12 | runs-on: ubuntu-latest |
61 | 13 | strategy: |
62 | 14 | fail-fast: false |
@@ -115,7 +67,15 @@ jobs: |
115 | 67 | NEXTCLOUD_URL: http://localhost:8080 |
116 | 68 | NEXTCLOUD_USER: admin |
117 | 69 | NEXTCLOUD_PASSWORD: admin |
118 | | - run: pytest tests/integration/ -v -m integration |
| 70 | + run: pytest tests/integration/ -v -m integration --cov=nextcloud_mcp --cov-report=xml:coverage-integration.xml |
| 71 | + |
| 72 | + - name: Upload coverage |
| 73 | + uses: codecov/codecov-action@v5 |
| 74 | + with: |
| 75 | + files: coverage-integration.xml |
| 76 | + flags: integration,nc${{ matrix.nextcloud-version }} |
| 77 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 78 | + fail_ci_if_error: false |
119 | 79 |
|
120 | 80 | - name: Dump Nextcloud logs on failure |
121 | 81 | if: failure() |
|
0 commit comments