forked from sirkirby/unifi-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.67 KB
/
Copy pathtest-access.yml
File metadata and controls
61 lines (50 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: "Access: Test"
on:
push:
branches: [ main, develop ]
pull_request:
types: [ opened, synchronize, reopened ]
branches: [ main, develop ]
env:
# Needed until first access/v* tag exists — hatch-vcs can't resolve version without it
SETUPTOOLS_SCM_PRETEND_VERSION: "0.0.0.dev0"
jobs:
test:
name: Test on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0 # Full history needed for hatch-vcs to determine version from tags
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install dependencies
run: |
uv sync
- name: Run unit tests
run: |
uv run --package unifi-access-mcp pytest apps/access/tests/unit/ -n auto -v --tb=short
- name: Run integration tests
run: |
uv run --package unifi-access-mcp pytest apps/access/tests/integration/ -n auto -v --tb=short || test $? -eq 5
- name: Run all tests with coverage
run: |
uv run --package unifi-access-mcp pytest apps/access/tests/ -n auto -v --cov=unifi_access_mcp --cov-report=term-missing --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false