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
49 changes: 17 additions & 32 deletions .github/workflows/Push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0

unittest:
runs-on: ubuntu-latest
Expand All @@ -26,29 +26,17 @@ jobs:
python-version: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
pip install --upgrade pip
pip install poetry
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Define a cache for the virtual environment based on the dependencies lock file
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Set up Python environment
run: |
poetry install --with test
- name: Run Tests
run: poetry run pytest --junit-xml=testresults/test-client.xml
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python environment
run: uv sync --group test
- name: Run Tests
run: uv run pytest --junit-xml=testresults/test-client.xml

test-build:
# run a build, to make sure the build doesn't fail
Expand All @@ -62,11 +50,8 @@ jobs:
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Build Package
run: |
poetry build
run: uv build
67 changes: 28 additions & 39 deletions .github/workflows/Tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0

unittest:
runs-on: ubuntu-latest
Expand All @@ -23,29 +23,17 @@ jobs:
python-version: ["3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
pip install --upgrade pip
pip install poetry
- name: Setup a local virtual environment (if no poetry.toml file)
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Define a cache for the virtual environment based on the dependencies lock file
uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Set up Python environment
run: |
poetry install --with test
- name: Run Tests
run: poetry run pytest --junit-xml=testresults/test-client.xml
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python environment
run: uv sync --group test
- name: Run Tests
run: uv run pytest --junit-xml=testresults/test-client.xml

# ---- Publish ----
build-and-publish:
Expand All @@ -61,17 +49,18 @@ jobs:
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Install uv
uses: astral-sh/setup-uv@v3

- name: Build Package
- name: Set version and build
run: |
poetry config pypi-token.pypi ${{secrets.PYPI_LIB_TOKEN}}
poetry version ${{ github.ref_name }}
poetry build
poetry publish
uv version ${{ github.ref_name }}
uv build

- name: Publish to PyPI
env:
UV_PUBLISH_TOKEN: ${{secrets.PYPI_LIB_TOKEN}}
run: uv publish

publish-docs:
runs-on: ubuntu-latest
Expand All @@ -85,10 +74,10 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install Poetry
run: pip install poetry
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install dependencies for docs
run: poetry install --with dev
run: uv sync --group dev
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
Expand All @@ -97,4 +86,4 @@ jobs:
restore-keys: |
mkdocs-material-
- name: Deploy docs
run: poetry run mkdocs gh-deploy --force
run: uv run mkdocs gh-deploy --force
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ dist/
.pytest_cache
site/
.ruff_cache
*.egg-info/
Loading
Loading