From 4a1fa5fe405dbead05373ab4765d2cced49d014f Mon Sep 17 00:00:00 2001 From: "M.P. Korstanje" Date: Fri, 15 Nov 2024 00:06:16 +0100 Subject: [PATCH 1/4] python: Extract check build step --- .github/workflows/release-pypi.yaml | 2 +- .github/workflows/test-python.yml | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-pypi.yaml b/.github/workflows/release-pypi.yaml index 29e5b6c4d..77e8a7e70 100644 --- a/.github/workflows/release-pypi.yaml +++ b/.github/workflows/release-pypi.yaml @@ -26,7 +26,7 @@ jobs: - name: Show Python version run: python --version - - name: Install Python package dependencies + - name: Check build run: | python -m pip install build twine python -m build diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index edaefa6eb..09c5bb8dc 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -48,14 +48,16 @@ jobs: run: python --version - name: Install Python package dependencies run: | - python -m pip install build twine pip setuptools wheel + python -m pip install twine pip setuptools wheel pip install -r requirements.txt pip install -e . - python -m build - twine check --strict dist/* - name: Run tests run: pytest - - - name: run acceptance tests + - name: Run Acceptance Tests run: make acceptance working-directory: python + - name: Check build + run: | + python -m pip install build twine + python -m build + twine check --strict dist/* \ No newline at end of file From cb0ccfa10b7f2f3469f93c09d1717a94ae96e676 Mon Sep 17 00:00:00 2001 From: "M.P. Korstanje" Date: Fri, 15 Nov 2024 00:08:28 +0100 Subject: [PATCH 2/4] Formast --- .github/workflows/release-pypi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-pypi.yaml b/.github/workflows/release-pypi.yaml index 77e8a7e70..70d539bc1 100644 --- a/.github/workflows/release-pypi.yaml +++ b/.github/workflows/release-pypi.yaml @@ -31,6 +31,7 @@ jobs: python -m pip install build twine python -m build twine check --strict dist/* + - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From 5c910c037c4a5db909146c9cc4a6dba7bc693637 Mon Sep 17 00:00:00 2001 From: "M.P. Korstanje" Date: Fri, 15 Nov 2024 00:14:29 +0100 Subject: [PATCH 3/4] Simplify --- .github/workflows/test-python.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index 09c5bb8dc..5c780632a 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -36,7 +36,9 @@ jobs: - '3.11' - '3.10' - '3.9' - + defaults: + run: + working-directory: python steps: - uses: actions/checkout@v4 - name: Set up Python @@ -55,9 +57,8 @@ jobs: run: pytest - name: Run Acceptance Tests run: make acceptance - working-directory: python - name: Check build run: | python -m pip install build twine python -m build - twine check --strict dist/* \ No newline at end of file + twine check --strict dist/* From d0b2d7b530fd891279dc5cb6badcdc45e0c2f461 Mon Sep 17 00:00:00 2001 From: "M.P. Korstanje" Date: Sun, 24 Nov 2024 20:45:44 +0100 Subject: [PATCH 4/4] Review steps for clarity --- .github/workflows/release-pypi.yaml | 2 +- .github/workflows/test-python.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-pypi.yaml b/.github/workflows/release-pypi.yaml index 70d539bc1..4d40ddf15 100644 --- a/.github/workflows/release-pypi.yaml +++ b/.github/workflows/release-pypi.yaml @@ -26,7 +26,7 @@ jobs: - name: Show Python version run: python --version - - name: Check build + - name: Build package run: | python -m pip install build twine python -m build diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index 5c780632a..3c6188df0 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -57,7 +57,7 @@ jobs: run: pytest - name: Run Acceptance Tests run: make acceptance - - name: Check build + - name: Build package run: | python -m pip install build twine python -m build