-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (77 loc) · 2.08 KB
/
Copy pathci.yml
File metadata and controls
84 lines (77 loc) · 2.08 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit:
name: Unit and static analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.13"
cache: pip
- run: python -m pip install -e ".[dev]"
- run: ruff format --check .
- run: ruff check .
- run: mypy
- run: pytest tests/unit tests/integration --cov=llm_router --cov-report=term-missing --cov-report=xml
- uses: actions/upload-artifact@v7
with:
name: coverage
path: coverage.xml
integration:
name: Integration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.13"
cache: pip
- run: python -m pip install -e ".[dev]"
- run: pytest tests/integration
e2e:
name: Playwright E2E
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.13"
cache: pip
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- run: python -m pip install -e ".[dev]"
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npm run test:e2e
- if: ${{ !cancelled() }}
uses: actions/upload-artifact@v7
with:
name: playwright-report
path: playwright-report/
retention-days: 14
container:
name: Release image validation
runs-on: ubuntu-latest
needs: [unit, integration, e2e]
steps:
- uses: actions/checkout@v7
- uses: docker/setup-buildx-action@v4
- uses: docker/build-push-action@v7
with:
context: .
push: false
tags: local-llm-router:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max