Merge pull request #14 from SamBroomy/version-bump #35
This file contains 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
--- | |
name: CI Pipeline | |
on: | |
push: | |
tags: | |
- 'v*' | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: | |
contents: read | |
pull-requests: write | |
id-token: write | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv with Caching | |
uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "pyproject.toml" | |
- name: Install Dependencies | |
run: | | |
uv sync --dev | |
- name: Run Ruff | |
run: uv run ruff check --output-format=github . | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
needs: lint | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv with Caching | |
uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "pyproject.toml" | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
uv sync --dev | |
- name: Run Tests with Coverage | |
run: | | |
uv run pytest | |
- name: Minimize uv Cache | |
run: uv cache prune --ci | |
publish: | |
name: Build and Publish to PyPI | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv with Caching | |
uses: astral-sh/setup-uv@v4 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "pyproject.toml" | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Build, Publish | |
run: | | |
uvx --from rust-just just publish-package | |
- name: Minimize uv Cache | |
run: uv cache prune --ci |