Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,42 @@ name: build

on:
push:
branches: [main, develop]
branches:
- '**'
pull_request:
branches: [main, develop]
branches:
- '**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
python-version: ['3.12', '3.13', '3.14']
name: build - Python ${{ matrix.python-version }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
version: latest

# Install build dependencies
- name: Install build dependencies
run: |
python -m pip install --upgrade pip setuptools wheel poetry pre-commit
- name: Set up Python
run: uv python install ${{ matrix.python-version }}

# install
- name: Install
id: install
run: poetry install
- name: Install dependencies
run: uv sync --extra dev

# Run pre-commit
- name: Run pre-commit
run: pre-commit run --all-files
run: uvx pre-commit run --all-files

# Run tests
- name: Run tests
run: poetry run pytest
run: uv run pytest
32 changes: 17 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
---
name: Release

on: [push, pull_request]
on:
push:
tags:
- '*'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.12'
version: latest

- name: Install poetry
run: |
python -m pip install poetry
- name: Set up Python
run: uv python install 3.12

- name: Install build dependencies
run: python -m pip install build wheel twine
- name: Set version from git tag
run: uv version $(git describe --tags --abbrev=0)

- name: Build distributions
shell: bash -l {0}
run: |
python -m poetry version $(git describe --tags --abbrev=0)
python -m poetry build
run: uv build

- name: Check build artifacts
run: |
python -m twine check --strict dist/*
uvx twine check --strict dist/*

- name: Verify the built dist/wheel is valid
if: github.event_name == 'push'
Expand Down
Loading
Loading