From cde4774fb1f8f11a552f0835c2fb05ad9b288b33 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 6 Dec 2022 00:11:43 +0100 Subject: [PATCH] Adjust the GHA workflow per yamllint rules --- .github/workflows/test-upload.yml | 69 +++++++++++++++++-------------- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/.github/workflows/test-upload.yml b/.github/workflows/test-upload.yml index 5948b5d..8b9d581 100644 --- a/.github/workflows/test-upload.yml +++ b/.github/workflows/test-upload.yml @@ -1,45 +1,52 @@ +--- + name: Test Upload -on: - pull_request: +on: # yamllint disable-line rule:truthy push: + pull_request: jobs: test: runs-on: ubuntu-latest + services: devpi: image: muccg/devpi env: DEVPI_PASSWORD: abcd1234 ports: - - 3141 + - 3141 + 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 - env: - CONTENTS: | - [build-system] - requires = ["setuptools>=61", "wheel"] - build-backend = "setuptools.build_meta" - [project] - name = "test-package" - version = "0.1" - readme = "README.md" - - run: python3 -m build - - run: twine register dist/*.tar.gz - env: - TWINE_USERNAME: root - TWINE_PASSWORD: abcd1234 - TWINE_REPOSITORY_URL: http://localhost:${{ job.services.devpi.ports['3141'] }}/root/public/ - - uses: actions/checkout@v3 - with: - path: test - - uses: ./test - with: - user: root - password: abcd1234 - repository_url: http://devpi:3141/root/public/ + - 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 + env: + CONTENTS: | + [build-system] + requires = ["setuptools>=61", "wheel"] + build-backend = "setuptools.build_meta" + [project] + name = "test-package" + version = "0.1" + readme = "README.md" + - run: python3 -m build + - run: twine register dist/*.tar.gz + env: + TWINE_USERNAME: root + TWINE_PASSWORD: abcd1234 + TWINE_REPOSITORY_URL: >- + http://localhost:${{ job.services.devpi.ports['3141'] }}/root/public/ + - uses: actions/checkout@v3 + with: + path: test + - uses: ./test + with: + user: root + password: abcd1234 + repository_url: http://devpi:3141/root/public/ + +...