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
12 changes: 7 additions & 5 deletions .github/workflows/create-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ jobs:
repo: ${{ github.event.repository.full_name }}
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}

- name: Set up Python
- name: Install Rye
if: ${{ steps.release.outputs.releases_created }}
uses: actions/setup-python@v4
with:
python-version: '3.7'
run: |
curl -sSf https://rye-up.com/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: 0.15.2
RYE_INSTALL_OPTION: "--yes"

- name: Publish to PyPI
if: ${{ steps.release.outputs.releases_created }}
run: |
pipx install poetry
bash ./bin/publish-pypi
env:
PYPI_TOKEN: ${{ secrets.INCREASE_PYPI_TOKEN }}
12 changes: 7 additions & 5 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: Install Rye
run: |
curl -sSf https://rye-up.com/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: 0.15.2
RYE_INSTALL_OPTION: "--yes"

- name: Publish to PyPI
run: |
pipx install poetry
bash ./bin/publish-pypi
env:
PYPI_TOKEN: ${{ secrets.INCREASE_PYPI_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ __pycache__

dist

.venv

.env
codegen.log
5 changes: 3 additions & 2 deletions bin/publish-pypi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash

set -eux
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
mkdir dist
rye build --clean
rye publish --yes --token=$PYPI_TOKEN
2 changes: 1 addition & 1 deletion bin/test
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

bin/check-test-server && poetry run pytest "$@"
bin/check-test-server && rye run pytest "$@"
9 changes: 3 additions & 6 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import nox
import nox_poetry


@nox_poetry.session(reuse_venv=True, name="test-pydantic-v1")
@nox.session(reuse_venv=True, name="test-pydantic-v1")
def test_pydantic_v1(session: nox.Session) -> None:
session.run_always("poetry", "install", external=True)

# https://github.com/cjolowicz/nox-poetry/issues/1116
session._session.run("python", "-m", "pip", "install", "pydantic<2", external=True) # type: ignore
session.install("-r", "requirements-dev.lock")
session.install("pydantic<2")

session.run("pytest", "--showlocals", "--ignore=tests/functional", *session.posargs)
Loading