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
28 changes: 28 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name-template: 'v$NEXT_PATCH_VERSION 🕺'
tag-template: '$NEXT_PATCH_VERSION'
categories:
- title: 'New Features'
label: 'enhancement'
- title: 'Deprecation'
label: 'deprecation'
- title: 'Bug Fixes'
labels:
- 'bug'
- 'Fix'
- title: 'Documentation'
label: 'documentation'
- title: 'Maintenance'
labels:
- 'maintenance'
- 'dependencies'
- 'github_actions'
- title: 'Testing'
label: 'tests'
- title: 'Under the Bonnet'
label: 'code improvement'
- title: 'Continuous Integration'
label: 'CI'
template: |
# What's Changed

$CHANGES
54 changes: 54 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and test

on:
workflow_dispatch:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
check-ruff:
# fail it if doesn't conform to ruff formatter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/ruff-action@v3
with:
args: "format --check --diff"

build-and-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.13"]
steps:
- uses: actions/checkout@v5
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
- name: Enable caching
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install OpenGL dependencies (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libglu1-mesa libgl1-mesa-dev
- name: Install Xvfb (Linux only)
if: runner.os == 'Linux'
run: sudo apt-get install -y xvfb
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Run tests with virtual display (Linux only)
if: runner.os == 'Linux'
run: xvfb-run -a .venv/bin/python -m pytest
- name: Run tests (non-Linux)
if: runner.os != 'Linux'
run: uv run pytest tests
16 changes: 16 additions & 0 deletions .github/workflows/draft-release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Release Drafter

on:
push:
branches:
- master

# Updates next release notes on any push to master. Label a PR to categorize it
# in accordance with .github/release_drafter.yml.
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Workflow to upload a Python Package using Twine when a release is created
name: Release to PyPI

on:
release:
types: [released]

permissions:
id-token: write
contents: read

jobs:
deploy:
runs-on: windows-latest # ensures necessary libs included for build_test
environment:
name: pypi
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install Python 3.13
run: uv python install 3.13
- name: Build
run: uv build
# Check can launch app as built...
- name: Smoke test (wheel)
run: uv run --isolated --no-project --with dist/*.whl tests/build_test.py
- name: Smoke test (source distribution)
run: uv run --isolated --no-project --with dist/*.tar.gz tests/build_test.py
- name: Publish
run: uv publish
- name: Wait for PyPI to publish
shell: bash
run: |
sleep 5
- name: Check install and import
run: uv run --with pyroids --no-project -- python -c 'import pyroids;print(f"{pyroids.__version__=}")'
Loading
Loading