Bump version for release #424
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
| name: Python package | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 # ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] | |
| 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 uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install dependencies | |
| run: | | |
| uv sync --locked --all-extras | |
| ./setup-test-env.sh | |
| - name: Lint with ruff | |
| run: | | |
| source .venv/bin/activate | |
| ruff check src tests e2e-tests | |
| ruff format --check src tests e2e-tests | |
| - name: Typecheck with mypy | |
| run: | | |
| source .venv/bin/activate | |
| mypy src/ tests/ | |
| - name: Test with pytest | |
| env: | |
| COVERALLS_FLAG_NAME: ${{ matrix.python-version }} | |
| COVERALLS_PARALLEL: true | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| source .venv/bin/activate | |
| coverage run --source=lightkube -m pytest tests/ | |
| coveralls | |
| - name: Package (wheel) | |
| run: | | |
| uv build --wheel | |
| - name: Package (sdist) | |
| run: | | |
| uv build --sdist | |
| - name: Archive artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-${{ matrix.python-version }} | |
| path: | | |
| dist | |
| coveralls: | |
| name: Indicate completion to coveralls.io | |
| needs: build | |
| runs-on: ubuntu-latest | |
| container: python:3-slim | |
| steps: | |
| - name: Install coveralls | |
| run: pip3 install --upgrade coveralls | |
| - name: Finished | |
| run: coveralls --finish | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| e2e-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| k8s: [ '1.27', '1.34' ] | |
| name: E2E test in K8s ${{ matrix.k8s }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.10' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install dependencies | |
| run: | | |
| uv sync --locked --all-extras --no-install-project | |
| uv pip install . "lightkube-models==${{ matrix.k8s }}.*" | |
| - uses: nolar/setup-k3d-k3s@v1 | |
| with: | |
| version: v${{ matrix.k8s }} | |
| - run: kubectl version | |
| - run: | | |
| source .venv/bin/activate | |
| pytest e2e-tests/ |