-
Notifications
You must be signed in to change notification settings - Fork 89
50 lines (40 loc) · 1.38 KB
/
test.yaml
File metadata and controls
50 lines (40 loc) · 1.38 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
name: Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
uv sync
- name: (Debug environment)
run: |
printenv
python -V
uv pip freeze
- name: Run unit tests
run: |
# splitted into 2 steps because of problem with event-loop in aiohttp
uv run pytest -vvv -s --ignore=kubernetes_asyncio/e2e_test --ignore=kubernetes_asyncio/test --cov-report=xml --cov=kubernetes_asyncio
uv run pytest -vvv -s --cov-report=xml --cov=kubernetes_asyncio2 kubernetes_asyncio/test --cov-append
- name: Run e2e tests
run: |
scripts/kube-init.sh uv run pytest -vvv -s kubernetes_asyncio/e2e_test
- name: Lint with ruff (only on the latest version of Python)
if: matrix.python-version == '3.14'
run: |
uv run ruff format --diff
uv run ruff check
- name: Send coverage report
uses: codecov/codecov-action@v6
if: matrix.python-version == '3.14'
with:
token: ${{ secrets.CODECOV_TOKEN }}