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
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Basic CI setup: Lint with ruff, run tests with pytest
name: Test

on:
pull_request:
push:
branches:
- main

jobs:
# Do not lint for now, as the code is not yet compliant
#lint:
# name: Lint
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: astral-sh/setup-uv@v3
# - name: Ruff lint
# run: uv run ruff check .
# - name: Ruff format
# run: uv run ruff format --diff .
# # This isn't a general Python lint, this style is just used in this repository
# - name: Prettier format
# run: npx prettier --prose-wrap always --check "**/*.md"

test:
name: Run tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- run: uv run pytest
23 changes: 23 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release

on:
push:
tags:
# Publish on any tag starting with a `v`, e.g. v1.2.3
- '*'

jobs:
pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
# Environment and permissions trusted publishing.
environment:
# Create this environment in the GitHub repository under Settings -> Environments
name: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- run: uv build
- run: uv publish --trusted-publishing always
4 changes: 2 additions & 2 deletions .github/workflows/sphinx-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
name: Sphinx documentation to GitHub pages
steps:
- uses: actions/checkout@v4
- name: Installing the library
- name: Building HTML
uses: astral-sh/setup-uvv5
shell: bash -l {0}
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv run sphinx-build -M html docs/source/ docs/build/
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
Expand Down
Loading