Skip to content

Add installing with uv sync to CI and do coverage #5

Add installing with uv sync to CI and do coverage

Add installing with uv sync to CI and do coverage #5

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags: [v*]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python-version }}
runs-on: ${{ matrix.platform }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.13"]
steps:
- uses: actions/checkout@v6
- name: Setup python
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
activate-environment: "true"
- name: Install Windows OpenGL
uses: pyvista/setup-headless-display-action@v4.2
with:
qt: true
wm: herbstluftwm
- name: Install
run: uv sync
- name: Test
run: uv run pytest --color=yes --cov --cov-report=xml
env:
PLATFORM: ${{ matrix.platform }}
build-and-inspect-package:
name: Build & inspect package.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2
upload-to-pypi:
name: Upload package to PyPI
needs: build-and-inspect-package
if: success() && startsWith(github.ref, 'refs/tags/') && github.event_name != 'schedule'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Download built artifact to dist/
uses: actions/download-artifact@v8
with:
name: Packages
path: dist
- name: 🚢 Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: "./dist/*"