61 lines (57 loc) · 1.33 KB
/
python-package.yml
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
name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
kube-version:
- 1.15.12
- 1.16.15
- 1.17.16
- 1.18.14
- 1.19.6
- 1.20.1
- 1.21.0
- 1.22.0
- 1.23.6
- 1.24.1
- 1.25.4
- 1.26.0
- 1.27.1
- 1.28.1
- 1.29.0
- 1.30.0
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m lightkube-generate resources models openapi/kubernetes_v${{ matrix.kube-version }}.json
- name: Test
run: |
python test_models.py
python test_resources.py
- name: Package (bdist_wheel)
run: |
pip install wheel
python setup.py bdist_wheel
- name: Package (sdist)
run: |
python setup.py sdist
- name: Archive artifact
uses: actions/upload-artifact@v2
with:
name: v${{ matrix.kube-version }}
path: |
dist