From 1c4183fd91deb66a4edcbb930a5f2533186e594d Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 6 Dec 2022 22:26:08 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Make=20the=20GHA=20steps=20named?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/self-smoke-test-action.yml | 27 +++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/self-smoke-test-action.yml b/.github/workflows/self-smoke-test-action.yml index 9e6e717..9c0b777 100644 --- a/.github/workflows/self-smoke-test-action.yml +++ b/.github/workflows/self-smoke-test-action.yml @@ -48,11 +48,16 @@ jobs: timeout-minutes: 2 steps: - - run: python3 -m pip install --upgrade pip build twine - - run: mkdir -p src/test_package - - run: echo '__version__ = "0.1"' > src/test_package/__init__.py - - run: echo "# Test Package" > README.md - - run: echo "$CONTENTS" > pyproject.toml + - name: Install the packaging-related tools + run: python3 -m pip install --upgrade pip build twine + - name: Create the stub package importable directory + run: mkdir -p src/test_package + - name: Populate the stub package `__init__.py` + run: echo '__version__ = "0.1"' > src/test_package/__init__.py + - name: Populate the stub package `README.md` + run: echo "# Test Package" > README.md + - name: Populate the stub package `pyproject.toml` + run: echo "$CONTENTS" > pyproject.toml env: CONTENTS: | [build-system] @@ -65,15 +70,19 @@ jobs: name = "test-package" version = "0.1" readme = "README.md" - - run: python3 -m build - - run: twine register dist/*.tar.gz + - name: Build the stub package sdist and wheel distributions + run: python3 -m build + - name: Register the stub package in devpi + run: twine register dist/*.tar.gz env: TWINE_USERNAME: ${{ env.devpi-username }} TWINE_PASSWORD: ${{ env.devpi-password }} - - uses: actions/checkout@v3 + - name: Check out the action locally + uses: actions/checkout@v3 with: path: test - - uses: ./test + - name: ✅ Smoke-test the locally checked out action + uses: ./test with: user: ${{ env.devpi-username }} password: ${{ env.devpi-password }}