Skip to content

Bump types-setuptools from 69.5.0.20240415 to 70.1.0.20240627 #391

Bump types-setuptools from 69.5.0.20240415 to 70.1.0.20240627

Bump types-setuptools from 69.5.0.20240415 to 70.1.0.20240627 #391

Workflow file for this run

name: Build
env:
POETRY_VERSION: "1.6.1"
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize
- labeled
branches:
- main
jobs:
build-and-publish:
name: Publish test release
runs-on: ubuntu-latest
outputs:
build-version: ${{ steps.build.outputs.version }}
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'test-build')
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set up Poetry
run: |
pip install poetry==${{ env.POETRY_VERSION }}
- name: Install local poetry-relax
run: |
poetry self add $(pwd)
- name: Relax constraints
run: |
poetry relax --check
- name: Publish to Test PyPI
id: build
env:
POETRY_PYPI_TOKEN_TEST_PYPI: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
version=$(./scripts/version dev)
echo "::set-output name=version::$version"
poetry version $version
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry publish --build -r test-pypi
test-install:
# We test the install on a clean machine to avoid poetry behavior attempting to
# install the project root when it is checked out
name: Test install
runs-on: ubuntu-latest
needs: build-and-publish
timeout-minutes: 5
steps:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set up Poetry
run: |
pip install poetry==${{ env.POETRY_VERSION }}
poetry init --name 'test-project' --no-interaction
poetry source add test-pypi https://test.pypi.org/simple/ --priority=explicit
- name: Wait for package to be available
run: >
until
curl --silent "https://test.pypi.org/simple/poetry-relax/"
| grep --quiet "${{ needs.build-and-publish.outputs.build-version }}";
do sleep 10;
done
&&
sleep 60
# We sleep for an additional 60 seconds as it seems to take a bit longer for
# the package to be consistently available
# Note: The above will not sleep forever due to the job level timeout
- name: Install release from Test PyPI
run: >
poetry add
--source test-pypi
poetry-relax==${{ needs.build-and-publish.outputs.build-version }}
- name: Check release version
run: |
installed=$(poetry run python -c "import pkg_resources; print(pkg_resources.get_distribution('poetry_relax').version)")
test $installed = ${{ needs.build-and-publish.outputs.build-version }}