Skip to content

Models v6: Fix compatibility issue for python 3.7 #42

Models v6: Fix compatibility issue for python 3.7

Models v6: Fix compatibility issue for python 3.7 #42

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
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