Merge branch 'kartben-patch-1' #191
This file contains hidden or 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: main | |
on: [push, pull_request, release] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- "ubuntu-latest" | |
- "macos-latest" | |
# - "windows-latest" | |
python-version: | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
- "3.13" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "0.6.9" | |
python-version: ${{ matrix.python-version }} | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
- name: Install graphviz | |
run: sudo apt install -y graphviz || true | |
- name: Run all | |
run: make all | |
- name: Upload coverage data to coveralls.io | |
run: uv run --frozen -- coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: ${{ matrix.test-name }} | |
COVERALLS_PARALLEL: true | |
coveralls: | |
name: Indicate completion to coveralls.io | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "0.6.9" | |
python-version: ${{ matrix.python-version }} | |
enable-cache: true | |
cache-dependency-glob: "uv.lock" | |
- name: Upload coverage data to coveralls.io | |
run: uv run --frozen -- coveralls --service=github --finish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish: | |
if: github.event_name == 'push' && github.ref_type == 'tag' | |
needs: coveralls | |
name: upload release to PyPI | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pdm-project/setup-pdm@v4 | |
- name: Publish package distributions to PyPI | |
run: pdm publish |