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
62 changes: 32 additions & 30 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,32 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-11, windows-2019]
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "pypy3.7", "pypy3.8", "pypy3.9", ]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9", ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up python
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Print Python Information
run: python -VV
- name: Install and configure Poetry
run: |
pip3 install poetry
poetry config virtualenvs.in-project true
- name: Install and configure uv
run: pip3 install uv
- name: Set up cache
uses: syphar/[email protected]
id: cache-virtualenv
uses: actions/cache@v4
id: cached-uv-dependencies
with:
requirement_files: poetry.lock
custom_virtualenv_dir: .venv
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/uv.lock') }}
- name: Install dependencies
run: poetry install
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
run: uv sync --all-extras
if: steps.cached-uv-dependencies.outputs.cache-hit != 'true'
- name: run tests
run: poetry run pytest -vv tests/*
run: uv run pytest -vv tests/*

builder:
needs: [test]
Expand All @@ -62,25 +60,28 @@ jobs:
echo "PYTHON_ARCHITECTURE=x64" >> $GITHUB_ENV
fi
- name: Set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.9.x"
architecture: "${{ env.PYTHON_ARCHITECTURE }}"
- name: Print Python Information
run: python -VV
- name: Update dependencies
run: python -m pip install -U pip wheel setuptools twine poetry
- name: Install and configure uv
run: pip3 install uv
- name: Set up cache
uses: syphar/[email protected]
id: cache-virtualenv
uses: actions/cache@v4
id: cached-uv-dependencies
with:
requirement_files: poetry.lock
custom_virtualenv_dir: .venv
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/uv.lock') }}
- name: Install dependencies
run: poetry install
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
run: uv sync --all-extras
if: steps.cached-uv-dependencies.outputs.cache-hit != 'true'

- name: Build universal source Archive and wheel
run: poetry build
run: uv build
- name: delete all files in dist that is not tar.gz or whl
run: find dist/ -type f ! -name "*.tar.gz" ! -name "*.whl" -delete
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand All @@ -89,11 +90,13 @@ jobs:

publisher_release:
needs: [builder]
if: startsWith(github.event.ref, 'refs/tags/v') && github.ref == 'refs/heads/master'
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v3
with:
Expand All @@ -103,16 +106,15 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}


publisher_latest:
needs: [builder]
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
207 changes: 0 additions & 207 deletions poetry.lock

This file was deleted.

Loading
Loading