diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml index 377b26a14a112..e54bcb360f403 100644 --- a/.github/workflows/_release.yml +++ b/.github/workflows/_release.yml @@ -192,7 +192,12 @@ jobs: poetry-version: ${{ env.POETRY_VERSION }} working-directory: ${{ inputs.working-directory }} - - name: Import published package + - uses: actions/download-artifact@v4 + with: + name: dist + path: ${{ inputs.working-directory }}/dist/ + + - name: Import dist package shell: bash working-directory: ${{ inputs.working-directory }} env: @@ -208,15 +213,7 @@ jobs: # - attempt install again after 5 seconds if it fails because there is # sometimes a delay in availability on test pypi run: | - poetry run pip install \ - --extra-index-url https://test.pypi.org/simple/ \ - "$PKG_NAME==$VERSION" || \ - ( \ - sleep 15 && \ - poetry run pip install \ - --extra-index-url https://test.pypi.org/simple/ \ - "$PKG_NAME==$VERSION" \ - ) + poetry run pip install dist/*.whl # Replace all dashes in the package name with underscores, # since that's how Python imports packages with dashes in the name. @@ -225,10 +222,10 @@ jobs: poetry run python -c "import $IMPORT_NAME; print(dir($IMPORT_NAME))" - name: Import test dependencies - run: poetry install --with test + run: poetry install --with test --no-root working-directory: ${{ inputs.working-directory }} - # Overwrite the local version of the package with the test PyPI version. + # Overwrite the local version of the package with the built version - name: Import published package (again) working-directory: ${{ inputs.working-directory }} shell: bash @@ -236,9 +233,7 @@ jobs: PKG_NAME: ${{ needs.build.outputs.pkg-name }} VERSION: ${{ needs.build.outputs.version }} run: | - poetry run pip install \ - --extra-index-url https://test.pypi.org/simple/ \ - "$PKG_NAME==$VERSION" + poetry run pip install dist/*.whl - name: Run unit tests run: make tests