-
Notifications
You must be signed in to change notification settings - Fork 72
53 lines (42 loc) · 1.41 KB
/
test.yaml
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
name: Tests
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r test-requirements.txt
- name: (Debug environment)
run: |
printenv
python -V
pip freeze
- name: Run unit tests
run: |
# splitted into 2 steps because of problem with event-loop in aiohttp
py.test -vvv -s --ignore=kubernetes_asyncio/e2e_test --ignore=kubernetes_asyncio/test --cov-report=xml --cov=kubernetes_asyncio
py.test -vvv -s --cov-report=xml --cov=kubernetes_asyncio2 kubernetes_asyncio/test --cov-append
- name: Run e2e tests
run: |
scripts/kube-init.sh py.test -vvv -s kubernetes_asyncio/e2e_test
- name: Lint with flake8 and isort (only on the latest version of Python)
if: matrix.python-version == 3.11
run: |
flake8
isort -c --diff .
- name: Send coverage report
uses: codecov/codecov-action@v3
if: matrix.python-version == 3.11
with:
token: ${{ secrets.CODECOV_TOKEN }}