Skip to content

Use build as frontend and setuptools as backend to handle ci-environment #28

Use build as frontend and setuptools as backend to handle ci-environment

Use build as frontend and setuptools as backend to handle ci-environment #28

Workflow file for this run

name: Test
on:
push:
branches:
- main
- renovate/*
jobs:
test-publish-npm:
name: It publishes a PyPI package in a folder
runs-on: ubuntu-latest
environment: Publish to PyPI
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Set unique package version
id: set-version
run: |
sed -i -e "s/\(version *= *\"[0-9]*\.[0-9]*\)\.[0-9]*\(\"\)/\1.${{ github.run_number }}\2/" pyproject.toml
shell: bash
working-directory: "test/cucumber-test-release-automation"
- name: Test the action
uses: ./
with:
working-directory: "test/cucumber-test-release-automation"
- name: Assert that latest published package version is as expected
timeout-minutes: 1
run: |
version="0.0.${{ github.run_number }}"
# use an eventually loop to give indexes time to update
while ! curl -v https://pypi.org/pypi/cucumber-test-release-automation/$version/json --fail
do
echo "Trying again in 5 seconds..."
sleep 5
done