diff --git a/.github/workflows/reusable-smoke-test.yml b/.github/workflows/reusable-smoke-test.yml index 1b59efa..300801e 100644 --- a/.github/workflows/reusable-smoke-test.yml +++ b/.github/workflows/reusable-smoke-test.yml @@ -53,8 +53,16 @@ jobs: smoke-test: + strategy: + matrix: + container: + - '' # empty string == no container + - ubuntu:latest + runs-on: ubuntu-latest + container: ${{ matrix.container }} + services: devpi: image: muccg/devpi @@ -70,8 +78,18 @@ jobs: uses: actions/checkout@v4 with: path: test + - name: Install the OS-level tools + if: >- + matrix.container != '' + run: >- + apt update --yes && + apt install --yes cargo + - name: Ensure Python is there + uses: actions/setup-python@v5 + with: + python-version: 3.x - name: Install the packaging-related tools - run: python3 -m pip install build twine + run: python3 -m pip install build twine --prefer-binary --user env: PIP_CONSTRAINT: test/requirements/runtime.txt - name: Create the stub package importable directory @@ -86,7 +104,7 @@ jobs: CONTENTS: | [build-system] requires = [ - "setuptools == 65.6.3", + "setuptools == 75.6.0", ] build-backend = "setuptools.build_meta" @@ -119,14 +137,20 @@ jobs: for dist in dist/*.tar.gz do echo "Registering ${dist}..." - twine register "${dist}" + python3 -m twine register "${dist}" done env: TWINE_USERNAME: ${{ env.devpi-username }} TWINE_PASSWORD: ${{ env.devpi-password }} TWINE_REPOSITORY_URL: >- - http://localhost:${{ - job.services.devpi.ports[env.devpi-port] + http://${{ + matrix.container == '' + && 'localhost' + || 'devpi' + }}:${{ + matrix.container == '' + && job.services.devpi.ports[env.devpi-port] + || env.devpi-port }}/${{ env.devpi-username }}/public/ diff --git a/action.yml b/action.yml index 3e39fd1..484f19c 100644 --- a/action.yml +++ b/action.yml @@ -149,7 +149,10 @@ runs: steps.pre-installed-python.outputs.python-path == '' && steps.new-python.outputs.python-path || steps.pre-installed-python.outputs.python-path - }} '${{ github.action_path }}/create-docker-action.py' + }} "${GITHUB_ACTION_PATH}"/create-docker-action.py + # Use proposed workaround for ${{ github.action_path }} not working + # inside containers + # https://github.com/actions/runner/issues/2185#issuecomment-1683545859 env: REF: ${{ steps.set-repo-and-ref.outputs.ref }} REPO: ${{ steps.set-repo-and-ref.outputs.repo }}