From 1e7e0c11e1851010d9e00274eb0dd4357a9f331f Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Mon, 18 May 2026 12:03:56 +0100 Subject: [PATCH 01/21] Add a workflow vulnerability scanner --- .github/workflows/run-zizmor.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/run-zizmor.yml diff --git a/.github/workflows/run-zizmor.yml b/.github/workflows/run-zizmor.yml new file mode 100644 index 0000000..050ed42 --- /dev/null +++ b/.github/workflows/run-zizmor.yml @@ -0,0 +1,24 @@ +name: GitHub Actions Security Analysis with zizmor 🌈 + +on: + push: + branches: ["main"] + pull_request: + branches: ["**"] + +permissions: {} + +jobs: + zizmor: + name: Scan with Zizmor + runs-on: ubuntu-latest + permissions: + security-events: write + steps: + - name: Checkout repository + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Run zizmor 🌈 + uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3 From e2dd2a23a37b5c3fa5c7ac8607c9e3ea8b55abf9 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Mon, 18 May 2026 13:09:14 +0100 Subject: [PATCH 02/21] Starting to address the issues --- .github/workflows/benchmark-impl.yml | 1 + .github/workflows/build-exes-impl.yml | 8 + .github/workflows/doc-build-impl.yml | 2 + .github/workflows/release-impl.yml | 17 +- .github/workflows/test-impl.yml | 234 +++++++++++++++------ .github/workflows/test-pre-python-impl.yml | 4 +- setup-poetry/action.yml | 2 +- 7 files changed, 196 insertions(+), 72 deletions(-) diff --git a/.github/workflows/benchmark-impl.yml b/.github/workflows/benchmark-impl.yml index 92c6012..618cb0d 100644 --- a/.github/workflows/benchmark-impl.yml +++ b/.github/workflows/benchmark-impl.yml @@ -61,6 +61,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.ref }} + persist-credentials: false - name: Set up python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 50e2161..e1d6b1f 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -145,6 +145,7 @@ jobs: uses: actions/checkout@v6 with: fetch-depth: 0 # get all history and tags + persist-credentials: false - name: Get executable version name and store git SHA id: info run: | @@ -169,6 +170,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ needs.status.outputs.sha }} + persist-credentials: false - name: Set up python uses: actions/setup-python@v6 @@ -224,6 +226,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + with: + persist-credentials: false - name: Setup tmate session if: inputs.tmate_debugging == 'true' @@ -356,6 +360,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + with: + persist-credentials: false - name: Setup tmate session if: inputs.tmate_debugging == 'true' @@ -483,6 +489,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v6 + with: + persist-credentials: false - name: Setup tmate session if: inputs.tmate_debugging == 'true' diff --git a/.github/workflows/doc-build-impl.yml b/.github/workflows/doc-build-impl.yml index 330b191..f36f19a 100644 --- a/.github/workflows/doc-build-impl.yml +++ b/.github/workflows/doc-build-impl.yml @@ -88,12 +88,14 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.ref }} + persist-credentials: false - name: Checkout support code uses: actions/checkout@v6 with: repository: hpcflow/github-support path: github-support ref: ${{ inputs.script-branch }} + persist-credentials: false - name: Init Python ${{ inputs.python-version }} uses: actions/setup-python@v6 with: diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index e76345e..b80562e 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -175,6 +175,7 @@ jobs: fetch-depth: 0 # get all history and tags ref: ${{ inputs.pr-base-ref }} token: ${{ secrets.commit-token }} + persist-credentials: true - name: Configure git uses: hpcflow/github-support/configure-git@0.5 - name: Set up python ${{ inputs.python-version }} @@ -307,6 +308,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.pr-base-ref }} + persist-credentials: false - name: Set up python uses: actions/setup-python@v6 @@ -365,6 +367,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.pr-base-ref }} # otherwise we get the ref when the workflow started (missing above commit) + persist-credentials: false - name: Set up python ${{ inputs.python-version }} uses: actions/setup-python@v6 with: @@ -430,19 +433,21 @@ jobs: uses: hpcflow/github-support/compare@0.5 with: expected: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" - command: ${{ env.BUILT_EXE_PATH_FILE }} --version + command: | + "$BUILT_EXE_PATH_FILE" --version - name: Version check (folder) uses: hpcflow/github-support/compare@0.5 with: expected: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" - command: ${{ env.BUILT_EXE_PATH_DIR }} --version + command: | + "$BUILT_EXE_PATH_DIR" --version - name: Run test suite on the frozen app (folder) env: GH_TOKEN: ${{ secrets.general-token }} run: | - ${{ env.BUILT_EXE_PATH_DIR }} test + "$BUILT_EXE_PATH_DIR" test - name: Compress folder (windows, folder) if: runner.os == 'Windows' @@ -483,6 +488,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.pr-base-ref }} # otherwise we get the ref when the workflow started (missing above commit) + persist-credentials: false - name: Cache dependencies uses: hpcflow/github-support/init-cache@0.5 with: @@ -583,6 +589,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ github.ref }} + persist-credentials: false - name: Set up python ${{ inputs.python-version }} uses: actions/setup-python@v6 with: @@ -636,6 +643,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ github.ref }} + persist-credentials: false - name: Make benchmark directory run: | mkdir benchmarks @@ -672,6 +680,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.pr-base-ref }} # otherwise we get the ref when the workflow started (missing above commit) + persist-credentials: false - name: Set up python ${{ inputs.python-version }} uses: actions/setup-python@v6 with: @@ -754,6 +763,7 @@ jobs: fetch-depth: 0 # get all history and tags ref: ${{ inputs.pr-base-ref }} # otherwise we get the ref when the workflow started (missing above commit) token: ${{ secrets.commit-token }} + persist-credentials: false - name: Configure git uses: hpcflow/github-support/configure-git@0.5 @@ -826,6 +836,7 @@ jobs: with: repository: ${{ inputs.website_source_org }}/${{ inputs.website_source_repo }} token: ${{ secrets.website-token }} + persist-credentials: true - name: Configure git uses: hpcflow/github-support/configure-git@0.5 diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index 1fcacdc..904e83d 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -152,6 +152,7 @@ jobs: # checkout PR source branch (head_ref) if event is pull_request: ref: ${{ inputs.head-ref || inputs.ref }} repository: ${{ inputs.full-repo-name }} + persist-credentials: true - name: Configure git for commits uses: hpcflow/github-support/configure-git@0.5 - name: Set up python @@ -187,6 +188,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.ref }} + persist-credentials: false - name: Set up python uses: actions/setup-python@v6 @@ -212,7 +214,9 @@ jobs: - name: Cache all app data and programs run: | - poetry run python -m ${{ inputs.CLI_module }} manage cache-all + poetry run python -m "$CLI_MODULE" manage cache-all + env: + CLI_MODULE: ${{ inputs.CLI_module }} - name: Upload all cached app data/programs id: upload-cached-app-data @@ -242,6 +246,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.ref }} + persist-credentials: false - name: Set up python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: @@ -272,19 +277,21 @@ jobs: - name: Install cached app data env: PYTHONUTF8: 1 + EXE_NAME: ${{ inputs.executable_name }} run: | - poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data - poetry run ${{ inputs.executable_name }} data --list - poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs - poetry run ${{ inputs.executable_name }} program --list + poetry run "$EXE_NAME" data install-cache "${EXE_NAME}-app-data-cache/data" + poetry run "$EXE_NAME" data --list + poetry run "$EXE_NAME" program install-cache "${EXE_NAME}-app-data-cache/programs" + poetry run "$EXE_NAME" program --list - name: Run tests timeout-minutes: ${{ inputs.unit-test-timeout-minutes }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok + EXE_NAME: ${{ inputs.executable_name }} run: | - poetry run ${{ inputs.executable_name }} test ${{ inputs.pytest_args }} ${{ inputs.unit_test_args }} + poetry run "$EXE_NAME" test ${{ inputs.pytest_args }} ${{ inputs.unit_test_args }} test-units-RockyLinux: needs: [pre-commit, cache-app-data] @@ -298,6 +305,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.ref }} + persist-credentials: false - name: Cache dependencies uses: hpcflow/github-support/init-cache@0.5 with: @@ -316,17 +324,21 @@ jobs: image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home - --env GH_TOKEN=${{ secrets.GITHUB_TOKEN }} + --env GH_TOKEN --env EXE_NAME --env UT_ARGS run: | cd /home poetry config virtualenvs.in-project true poetry install --without dev,pyinstaller - poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data - poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs - poetry run ${{ inputs.executable_name }} data --list - poetry run ${{ inputs.executable_name }} program --list + poetry run "$EXE_NAME" data install-cache "${EXE_NAME}-app-data-cache/data" + poetry run "$EXE_NAME" program install-cache "${EXE_NAME}-app-data-cache/programs" + poetry run "$EXE_NAME" data --list + poetry run "$EXE_NAME" program --list export PYTHONUNBUFFERED=ok - poetry run ${{ inputs.executable_name }} test ${{ inputs.unit_test_args }} + poetry run "$EXE_NAME" test $UT_ARGS + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + EXE_NAME: ${{ inputs.executable_name }} + UT_ARGS: ${{ inputs.unit_test_args }} timeout-minutes: ${{ inputs.unit-test-timeout-minutes }} test-integration: @@ -349,6 +361,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.ref }} + persist-credentials: false - name: Set up python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: @@ -378,19 +391,23 @@ jobs: - name: Install cached app data env: PYTHONUTF8: 1 + EXE_NAME: ${{ inputs.executable_name }} run: | - poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data - poetry run ${{ inputs.executable_name }} data --list - poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs - poetry run ${{ inputs.executable_name }} program --list + poetry run "$EXE_NAME" data install-cache "${EXE_NAME}-app-data-cache/data" + poetry run "$EXE_NAME" data --list + poetry run "$EXE_NAME" program install-cache "${EXE_NAME}-app-data-cache/programs" + poetry run "$EXE_NAME" program --list - name: Run integration tests timeout-minutes: ${{ inputs.integration-test-timeout-minutes }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok + EXE_NAME: ${{ inputs.executable_name }} + PYTEST_ARGS: ${{ inputs.pytest_args }} + IT_ARGS: ${{ inputs.integration_test_args }} run: | - poetry run ${{ inputs.executable_name }} test ${{ inputs.pytest_args }} --integration ${{ inputs.integration_test_args }} + poetry run "$EXE_NAME" test $PYTEST_ARGS --integration $IT_ARGS test-integration-RockyLinux: needs: [pre-commit, cache-app-data] @@ -404,6 +421,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.ref }} + persist-credentials: false - name: Cache dependencies uses: hpcflow/github-support/init-cache@0.5 with: @@ -422,17 +440,21 @@ jobs: image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home - --env GH_TOKEN=${{ secrets.GITHUB_TOKEN }} + --env GH_TOKEN --env EXE_NAME --env IT_ARGS run: | cd /home poetry config virtualenvs.in-project true poetry install --without dev,pyinstaller - poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data - poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs - poetry run ${{ inputs.executable_name }} data --list - poetry run ${{ inputs.executable_name }} program --list + poetry run "$EXE_NAME" data install-cache "${EXE_NAME}-app-data-cache/data" + poetry run "$EXE_NAME" program install-cache "${EXE_NAME}-app-data-cache/programs" + poetry run "$EXE_NAME" data --list + poetry run "$EXE_NAME" program --list export PYTHONUNBUFFERED=ok - poetry run ${{ inputs.executable_name }} test --integration ${{ inputs.integration_test_args }} + poetry run "$EXE_NAME" test --integration $IT_ARGS + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + EXE_NAME: ${{ inputs.executable_name }} + IT_ARGS: ${{ inputs.integration_test_args }} timeout-minutes: ${{ inputs.integration-test-timeout-minutes }} test-invocation-ubuntu: @@ -450,12 +472,14 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.ref }} + persist-credentials: false - name: Checkout supporting test infrastructure uses: actions/checkout@v6 with: repository: hpcflow/github-support path: github-support ref: ${{ inputs.script-branch }} + persist-credentials: false - name: Set up python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: @@ -490,55 +514,81 @@ jobs: - name: Test invocation command with `python ./${{ inputs.CLI_path }}` uses: hpcflow/github-support/compare@0.5 with: - init: source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - command: python ./${{ inputs.CLI_path }} internal get-invoc-cmd + init: source "$POETRY_PATH/bin/activate" + command: python "./${CLI_PATH}" internal get-invoc-cmd expected: "('${{ steps.poetry.outputs.python-path }}', '${{ github.workspace }}/${{ inputs.CLI_path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + CLI_PATH: ${{ inputs.CLI_path }} - name: Test invocation command with `python -m ${{ inputs.CLI_module }}` uses: hpcflow/github-support/compare@0.5 with: - init: source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - command: python -m ${{ inputs.CLI_module }} internal get-invoc-cmd + init: source "$POETRY_PATH/bin/activate" + command: python -m "$CLI_MODULE" internal get-invoc-cmd expected: "('${{ steps.poetry.outputs.python-path }}', '${{ github.workspace }}/${{ inputs.CLI_path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + CLI_MODULE: ${{ inputs.CLI_module }} - name: Test invocation command with `${{ inputs.executable_name }}` entry point script uses: hpcflow/github-support/compare@0.5 with: - init: source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - command: ${{ inputs.executable_name }} internal get-invoc-cmd + init: source "$POETRY_PATH/bin/activate" + command: | + "$EXE_NAME" internal get-invoc-cmd expected: "('${{ steps.poetry.outputs.python-path }}', '${{ steps.prep-test-data.outputs.exe-path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + EXE_NAME: ${{ inputs.executable_name }} - name: Test invocation command within a python script uses: hpcflow/github-support/compare@0.5 with: - init: source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - command: python github-support/scripts/get_invoc_cmd.py ${{ inputs.app_package }} + init: source "$POETRY_PATH/bin/activate" + command: python github-support/scripts/get_invoc_cmd.py "$APP_PKG" expected: "('${{ steps.poetry.outputs.python-path }}', '${{ github.workspace }}/${{ inputs.CLI_path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} - name: Test invocation command with interactive python uses: hpcflow/github-support/compare@0.5 with: - init: source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - command: python github-support/scripts/get_invoc_cmd_interactive.py python ${{ inputs.app_package }} + init: source "$POETRY_PATH/bin/activate" + command: python github-support/scripts/get_invoc_cmd_interactive.py python "$APP_PKG" expected: "('${{ steps.poetry.outputs.python-path }}', '${{ github.workspace }}/${{ inputs.CLI_path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} - name: Test invocation command with interactive ipython uses: hpcflow/github-support/compare@0.5 with: - init: source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - command: python github-support/scripts/get_invoc_cmd_interactive.py ipython ${{ inputs.app_package }} + init: source "$POETRY_PATH/bin/activate" + command: python github-support/scripts/get_invoc_cmd_interactive.py ipython "$APP_PKG" expected: "('${{ steps.poetry.outputs.python-path }}', '${{ github.workspace }}/${{ inputs.CLI_path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} - name: Test direct workflow submission within a python script run: | - source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - python github-support/scripts/test_direct_sub_python_script.py ${{ inputs.app_package }} + source "$POETRY_PATH/bin/activate" + python github-support/scripts/test_direct_sub_python_script.py "$APP_PKG" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} - name: Test direct workflow submission within a Jupyter notebook (via papermill) run: | - source ${{ steps.poetry.outputs.poetry-path }}/bin/activate + source "$POETRY_PATH/bin/activate" python -m ipykernel install --user --name python3 - papermill github-support/scripts/test_direct_sub_jupyter_notebook.ipynb papermill_out/test_direct_sub_jupyter_notebook_${{ matrix.python-version }}_${{ runner.os }}.ipynb -p app_import_str ${{ inputs.app_package }} + papermill github-support/scripts/test_direct_sub_jupyter_notebook.ipynb "papermill_out/test_direct_sub_jupyter_notebook_${PY_VER}_${RUNNER_OS}.ipynb" -p app_import_str "$APP_PKG" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} + PY_VER: ${{ matrix.python-version }} test-invocation-macos: if: inputs.invocation_tests == 'true' @@ -555,12 +605,14 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.ref }} + persist-credentials: false - name: Checkout supporting test infrastructure uses: actions/checkout@v6 with: repository: hpcflow/github-support path: github-support ref: ${{ inputs.script-branch }} + persist-credentials: false - name: Set up python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: @@ -595,55 +647,81 @@ jobs: - name: Test invocation command with `python ./${{ inputs.CLI_path }}` uses: hpcflow/github-support/compare@0.5 with: - init: source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - command: python ./${{ inputs.CLI_path }} internal get-invoc-cmd + init: source "$POETRY_PATH/bin/activate" + command: python "./${CLI_PATH}" internal get-invoc-cmd expected: "('${{ steps.poetry.outputs.python-path }}', '${{ github.workspace }}/${{ inputs.CLI_path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + CLI_PATH: ${{ inputs.CLI_path }} - name: Test invocation command with `python -m ${{ inputs.CLI_module }}` uses: hpcflow/github-support/compare@0.5 with: - init: source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - command: python -m ${{ inputs.CLI_module }} internal get-invoc-cmd + init: source "$POETRY_PATH/bin/activate" + command: python -m "$CLI_MODULE" internal get-invoc-cmd expected: "('${{ steps.poetry.outputs.python-path }}', '${{ github.workspace }}/${{ inputs.CLI_path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + CLI_MODULE: ${{ inputs.CLI_module }} - name: Test invocation command with `${{ inputs.executable_name }}` entry point script uses: hpcflow/github-support/compare@0.5 with: - init: source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - command: ${{ inputs.executable_name }} internal get-invoc-cmd + init: source "$POETRY_PATH/bin/activate" + command: | + "$EXE_NAME" internal get-invoc-cmd expected: "('${{ steps.poetry.outputs.python-path }}', '${{ steps.prep-test-data.outputs.exe-path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + EXE_NAME: ${{ inputs.executable_name }} - name: Test invocation command within a python script uses: hpcflow/github-support/compare@0.5 with: - init: source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - command: python github-support/scripts/get_invoc_cmd.py ${{ inputs.app_package }} + init: source "$POETRY_PATH/bin/activate" + command: python github-support/scripts/get_invoc_cmd.py "$APP_PKG" expected: "('${{ steps.poetry.outputs.python-path }}', '${{ github.workspace }}/${{ inputs.CLI_path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} - name: Test invocation command with interactive python uses: hpcflow/github-support/compare@0.5 with: - init: source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - command: python github-support/scripts/get_invoc_cmd_interactive.py python ${{ inputs.app_package }} + init: source "$POETRY_PATH/bin/activate" + command: python github-support/scripts/get_invoc_cmd_interactive.py python "$APP_PKG" expected: "('${{ steps.poetry.outputs.python-path }}', '${{ github.workspace }}/${{ inputs.CLI_path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} - name: Test invocation command with interactive ipython uses: hpcflow/github-support/compare@0.5 with: - init: source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - command: python github-support/scripts/get_invoc_cmd_interactive.py ipython ${{ inputs.app_package }} + init: source "$POETRY_PATH/bin/activate" + command: python github-support/scripts/get_invoc_cmd_interactive.py ipython "$APP_PKG" expected: "('${{ steps.poetry.outputs.python-path }}', '${{ github.workspace }}/${{ inputs.CLI_path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} - name: Test direct workflow submission within a python script run: | - source ${{ steps.poetry.outputs.poetry-path }}/bin/activate - python github-support/scripts/test_direct_sub_python_script.py ${{ inputs.app_package }} + source "$POETRY_PATH/bin/activate" + python github-support/scripts/test_direct_sub_python_script.py "$APP_PKG" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} - name: Test direct workflow submission within a Jupyter notebook (via papermill) run: | - source ${{ steps.poetry.outputs.poetry-path }}/bin/activate + source "$POETRY_PATH/bin/activate" python -m ipykernel install --user --name python3 - papermill github-support/scripts/test_direct_sub_jupyter_notebook.ipynb papermill_out/test_direct_sub_jupyter_notebook_${{ matrix.python-version }}_${{ runner.os }}.ipynb -p app_import_str ${{ inputs.app_package }} + papermill github-support/scripts/test_direct_sub_jupyter_notebook.ipynb "papermill_out/test_direct_sub_jupyter_notebook_${PY_VER}_${RUNNER_OS}.ipynb" -p app_import_str "$APP_PKG" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} + PY_VER: ${{ matrix.python-version }} test-invocation-windows: if: inputs.invocation_tests == 'true' @@ -660,12 +738,14 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.ref }} + persist-credentials: false - name: Checkout supporting test infrastructure uses: actions/checkout@v6 with: repository: hpcflow/github-support path: github-support ref: ${{ inputs.script-branch }} + persist-credentials: false - name: Set up python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: @@ -702,41 +782,61 @@ jobs: - name: Test invocation command with `python ./${{ inputs.CLI_path }}` uses: hpcflow/github-support/compare@0.5 with: - init: ."${{ steps.poetry.outputs.poetry-path }}\Scripts\activate.ps1" - command: python ./${{ inputs.CLI_path }} internal get-invoc-cmd + init: ."$Env:POETRY_PATH\Scripts\activate.ps1" + command: python "./$Env:CLI_PATH" internal get-invoc-cmd expected: "('${{ steps.prep-test-data.outputs.python-path }}', '${{ steps.prep-test-data.outputs.cli-path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + CLI_PATH: ${{ inputs.CLI_path }} - name: Test invocation command with `python -m ${{ inputs.CLI_module }}` uses: hpcflow/github-support/compare@0.5 with: - init: ."${{ steps.poetry.outputs.poetry-path }}\Scripts\activate.ps1" - command: python -m ${{ inputs.CLI_module }} internal get-invoc-cmd + init: ."$Env:POETRY_PATH\Scripts\activate.ps1" + command: python -m "$Env:CLI_MODULE" internal get-invoc-cmd expected: "('${{ steps.prep-test-data.outputs.python-path }}', '${{ steps.prep-test-data.outputs.cli-path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + CLI_MODULE: ${{ inputs.CLI_module }} - name: Test invocation command with `${{ inputs.executable_name }}` entry point script uses: hpcflow/github-support/compare@0.5 with: - init: ."${{ steps.poetry.outputs.poetry-path }}\Scripts\activate.ps1" - command: ${{ inputs.executable_name }} internal get-invoc-cmd + init: ."$Env:POETRY_PATH\Scripts\activate.ps1" + command: | + "$Env:EXE_NAME" internal get-invoc-cmd expected: "('${{ steps.prep-test-data.outputs.python-path }}', '${{ steps.prep-test-data.outputs.exe-path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + EXE_NAME: ${{ inputs.executable_name }} - name: Test invocation command within a python script uses: hpcflow/github-support/compare@0.5 with: - init: ."${{ steps.poetry.outputs.poetry-path }}\Scripts\activate.ps1" - command: python github-support\scripts\get_invoc_cmd.py ${{ inputs.app_package }} + init: ."$Env:POETRY_PATH\Scripts\activate.ps1" + command: python github-support\scripts\get_invoc_cmd.py "$Env:APP_PKG" expected: "('${{ steps.prep-test-data.outputs.python-path }}', '${{ steps.prep-test-data.outputs.cli-path }}')" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} - name: Test direct workflow submission within a python script run: | - ."${{ steps.poetry.outputs.poetry-path }}\Scripts\activate.ps1" - python github-support\scripts\test_direct_sub_python_script.py ${{ inputs.app_package }} + ."$Env:POETRY_PATH\Scripts\activate.ps1" + python github-support\scripts\test_direct_sub_python_script.py "$Env:APP_PKG" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} - name: Test direct workflow submission within a Jupyter notebook (via papermill) run: | - ."${{ steps.poetry.outputs.poetry-path }}\Scripts\activate.ps1" + ."$Env:POETRY_PATH\Scripts\activate.ps1" python -m ipykernel install --user --name python3 - papermill github-support\scripts\test_direct_sub_jupyter_notebook.ipynb papermill_out\test_direct_sub_jupyter_notebook_${{ matrix.python-version }}_${{ runner.os }}.ipynb -p app_import_str ${{ inputs.app_package }} + papermill github-support\scripts\test_direct_sub_jupyter_notebook.ipynb "papermill_out\test_direct_sub_jupyter_notebook_$($Env:PY_VER)_$($Env:RUNNER_OS).ipynb" -p app_import_str "$Env:APP_PKG" + env: + POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} + APP_PKG: ${{ inputs.app_package }} + PY_VER: ${{ matrix.python-version }} cleanup-cache: needs: diff --git a/.github/workflows/test-pre-python-impl.yml b/.github/workflows/test-pre-python-impl.yml index a62e27d..d95bf2d 100644 --- a/.github/workflows/test-pre-python-impl.yml +++ b/.github/workflows/test-pre-python-impl.yml @@ -49,6 +49,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.ref }} + persist-credentials: false - name: Set up python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: @@ -70,6 +71,7 @@ jobs: - name: Run tests run: | - poetry run python -m pytest ${{ inputs.pytest-args }} + poetry run python -m pytest $ARGUMENTS env: PYTHONUNBUFFERED: ok + ARGUMENTS: ${{ inputs.pytest-args }} diff --git a/setup-poetry/action.yml b/setup-poetry/action.yml index 17657ab..27dbf70 100644 --- a/setup-poetry/action.yml +++ b/setup-poetry/action.yml @@ -24,7 +24,7 @@ runs: - name: Install shell: bash run: | - python -m pip install poetry==$VERSION + python -m pip install "poetry==$VERSION" env: VERSION: ${{ inputs.version }} - name: Configure From 69c39cd2890eae58d6b4086ab914d000a2f532ce Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Mon, 18 May 2026 14:59:34 +0100 Subject: [PATCH 03/21] Reducing template problems --- .github/workflows/benchmark-impl.yml | 7 +- .github/workflows/build-exes-impl.yml | 158 ++++++++++++++++++-------- .github/workflows/doc-build-impl.yml | 8 +- .github/workflows/release-impl.yml | 108 +++++++++++------- .github/workflows/test-impl.yml | 4 +- 5 files changed, 193 insertions(+), 92 deletions(-) diff --git a/.github/workflows/benchmark-impl.yml b/.github/workflows/benchmark-impl.yml index 618cb0d..b935b9c 100644 --- a/.github/workflows/benchmark-impl.yml +++ b/.github/workflows/benchmark-impl.yml @@ -83,12 +83,15 @@ jobs: - name: Set up variables id: vars run: | - echo "timeit=benchmark_make_workflow_${{ matrix.num_elements }}_elements-${{ runner.os }}-py-${{ matrix.python-version }}.txt" >> $GITHUB_OUTPUT + echo "timeit=benchmark_make_workflow_${N_ELEMS}_elements-${RUNNER_OS}-py-${PY_VER}.txt" >> $GITHUB_OUTPUT shell: bash + env: + N_ELEMS: ${{ matrix.num_elements }} + PY_VER: ${{ matrix.python-version }} - name: Run app make workflow command run: | - poetry run $EXECUTABLE --timeit-file $TIMEIT_FILE make $BENCHMARK --var N $N_ELEMS + poetry run "$EXECUTABLE" --timeit-file "$TIMEIT_FILE" make $BENCHMARK --var N "$N_ELEMS" env: EXECUTABLE: ${{ inputs.executable_name }} BENCHMARK: ${{ inputs.benchmark_make_workflow }} diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index e1d6b1f..9b768de 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -149,7 +149,7 @@ jobs: - name: Get executable version name and store git SHA id: info run: | - CUR_TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) + CUR_TAG="$(git describe --tags $(git rev-list --tags --max-count=1))" echo "CUR_TAG is: $CUR_TAG" echo "cur_tag=$CUR_TAG" >> $GITHUB_OUTPUT vers=$(git describe --tags) @@ -195,16 +195,24 @@ jobs: - name: Set data dir # in case we have a custom tag to use if: inputs.config_data_dir != '' run: | - poetry run ${{ inputs.executable_name }} config set data_dir ${{ inputs.config_data_dir }} + poetry run "$EXE_NAME" config set data_dir "$Dir" + env: + EXE_NAME: ${{ inputs.executable_name }} + Dir: ${{ inputs.config_data_dir }} - name: Set program dir # in case we have a custom tag to use if: inputs.config_program_dir != '' run: | - poetry run ${{ inputs.executable_name }} config set program_dir ${{ inputs.config_program_dir }} + poetry run "$EXE_NAME" config set program_dir "$Dir" + env: + EXE_NAME: ${{ inputs.executable_name }} + Dir: ${{ inputs.config_program_dir }} - name: Cache all app data and programs run: | - poetry run ${{ inputs.executable_name }} manage cache-all + poetry run "$EXE_NAME" manage cache-all + env: + EXE_NAME: ${{ inputs.executable_name }} - name: Upload all cached app data/programs id: upload-cached-app-data @@ -262,9 +270,11 @@ jobs: - name: Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` id: configure_python_env run: | - poetry run ${{ inputs.executable_name }} env setup python --use-current - $result = (poetry run ${{ inputs.executable_name }} env info source_file -l python) + poetry run "$env:EXE_NAME" env setup python --use-current + $result = (poetry run "$env:EXE_NAME" env info source_file -l python) "env_source_file=$result" | Out-File -FilePath $env:GITHUB_OUTPUT -Append -Encoding utf8 + env: + EXE_NAME: ${{ inputs.executable_name }} - name: Build with pyinstaller for Windows (file) id: win_onefile @@ -315,11 +325,12 @@ jobs: - name: Install cached app data env: PYTHONUTF8: 1 + EXE_NAME: ${{ inputs.executable_name }} run: | - poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data - poetry run ${{ inputs.executable_name }} data --list - poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs - poetry run ${{ inputs.executable_name }} program --list + poetry run $env:EXE_NAME data install-cache ${{ inputs.executable_name }}-app-data-cache/data + poetry run $env:EXE_NAME data --list + poetry run $env:EXE_NAME program install-cache ${{ inputs.executable_name }}-app-data-cache/programs + poetry run $env:EXE_NAME program --list - name: Run test suite on the frozen app (file) if: steps.win_onefile.outcome == 'success' && inputs.unit_tests == 'true' @@ -327,8 +338,9 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok PYTHONUTF8: 1 + EXE_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.unit_test_args }} + $env:EXE_FILE test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.unit_test_args }} - name: Run test suite on the frozen app (folder) if: steps.win_onedir.outcome == 'success' && inputs.unit_tests == 'true' @@ -336,8 +348,9 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok PYTHONUTF8: 1 + EXE_FILE: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe run: | - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.unit_test_args }} + $env:EXE_FILE test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.unit_test_args }} - name: Run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build if: steps.win_onefile.outcome == 'success' && inputs.integration_tests == 'true' @@ -345,8 +358,9 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok PYTHONUTF8: 1 + EXE_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.integration_test_args }} --integration + $env:EXE_FILE test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.integration_test_args }} --integration macos: name: Build macOS Executables @@ -396,21 +410,29 @@ jobs: - name: Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` id: configure_python_env run: | - poetry run ${{ inputs.executable_name }} env setup python --use-current - result=$(poetry run ${{ inputs.executable_name }} env info source_file -l python) + poetry run "$EXE_NAME" env setup python --use-current + result=$(poetry run "$EXE_NAME" env info source_file -l python) echo "env_source_file=$result" >> "$GITHUB_OUTPUT" + env: + EXE_NAME: ${{ inputs.executable_name }} - name: Build with pyinstaller for macOS (file) id: mac_onefile if: inputs.build_onefile == 'true' working-directory: ${{ inputs.pyinstaller_dir }} - run: ./make.sh ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS ${{ inputs.logLevel }} 'onefile' + run: ./make.sh "$TARGET" "$LOG_LEVEL" 'onefile' + env: + TARGET: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS + LOG_LEVEL: ${{ inputs.logLevel }} - name: Build with pyinstaller for macOS (folder) id: mac_onedir if: inputs.build_onedir == 'true' working-directory: ${{ inputs.pyinstaller_dir }} - run: ./make.sh ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir ${{ inputs.logLevel }} 'onedir' + run: ./make.sh "$TARGET" "$LOG_LEVEL" 'onedir' + env: + TARGET: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir + LOG_LEVEL: ${{ inputs.logLevel }} - name: Upload executable artifact (file) id: upload-file @@ -448,34 +470,45 @@ jobs: - name: Install cached app data run: | - poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data - poetry run ${{ inputs.executable_name }} data --list - poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs - poetry run ${{ inputs.executable_name }} program --list + poetry run "$EXE_NAME" data install-cache "${EXE_NAME}-app-data-cache/data" + poetry run "$EXE_NAME" data --list + poetry run "$EXE_NAME" program install-cache "${EXE_NAME}-app-data-cache/programs" + poetry run "$EXE_NAME" program --list + env: + EXE_NAME: ${{ inputs.executable_name }} - name: Run test suite on the frozen app (file) if: steps.mac_onefile.outcome == 'success' && inputs.unit_tests == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok + TARGET: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS + ENV_SRC: ${{ steps.configure_python_env.outputs.env_source_file }} + UT_ARGS: ${{ inputs.unit_test_args }} run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.unit_test_args }} + "$TARGET" test --with-env-source "$ENV_SRC" $UT_ARGS - name: Run test suite on the frozen app (folder) if: steps.mac_onedir.outcome == 'success' && inputs.unit_tests == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok + TARGET: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir + ENV_SRC: ${{ steps.configure_python_env.outputs.env_source_file }} + UT_ARGS: ${{ inputs.unit_test_args }} run: | - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.unit_test_args }} + "$TARGET" test --with-env-source "$ENV_SRC" $UT_ARGS - name: Run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build if: steps.mac_onefile.outcome == 'success' && inputs.integration_tests == 'true' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok + TARGET: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS + ENV_SRC: ${{ steps.configure_python_env.outputs.env_source_file }} + IT_ARGS: ${{ inputs.integration_test_args }} run: | - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.integration_test_args }} --integration + "$TARGET" test --with-env-source "$ENV_SRC" $IT_ARGS --integration linux: name: Build Linux (Rocky Linux 8) Executables @@ -523,13 +556,19 @@ jobs: image: ghcr.io/hpcflow/rockylinux8-python:latest # most of the options are just so we can debug (via tmate) when we have a custom pytest --basetemp directory options: | -v ${{ github.workspace }}:/home - -u ${{ steps.user.outputs.user }} + -u $THE_USER --env HOME=/home --env XDG_DATA_HOME=/home/.local/share --env XDG_CACHE_HOME=/home/.cache - --env GH_TOKEN=${{ secrets.GITHUB_TOKEN }} - --env UNIT_TESTS=${{ inputs.unit_tests }} - --env INTEGRATION_TESTS=${{ inputs.integration_tests }} + --env GH_TOKEN + --env UNIT_TESTS + --env INTEGRATION_TESTS + --env PYINST_DIR + --env EXE_NAME + --env VER + --env LOG_LEVEL + --env UT_ARGS + --env IT_ARGS run: | set -e # exit on first failure @@ -540,32 +579,43 @@ jobs: # Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` - poetry run ${{ inputs.executable_name }} env setup python --use-current - ENV_SOURCE_FILE=$(poetry run ${{ inputs.executable_name }} env info source_file -l python) + poetry run "$EXE_NAME" env setup python --use-current + ENV_SOURCE_FILE=$(poetry run "$EXE_NAME" env info source_file -l python) echo "ENV_SOURCE_FILE=${ENV_SOURCE_FILE}" # build with pyinstaller for Rocky Linux (file) - cd ${{ inputs.pyinstaller_dir }} - ./make.sh ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux ${{ inputs.logLevel }} onefile + cd "$PYINST_DIR" + ./make.sh "${EXE_NAME}-${VER}-linux" "$LOG_LEVEL" onefile cd .. # install cache data - poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data - poetry run ${{ inputs.executable_name }} data --list - poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs - poetry run ${{ inputs.executable_name }} program --list + poetry run "$PYINST_DIR" data install-cache "${EXE_NAME}-app-data-cache/data" + poetry run "$PYINST_DIR" data --list + poetry run "$PYINST_DIR" program install-cache "${EXE_NAME}-app-data-cache/programs" + poetry run "$PYINST_DIR" program --list export PYTHONUNBUFFERED=ok if [ "$UNIT_TESTS" = "true" ]; then # run test suite on the frozen app (file) - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test --with-env-source ${ENV_SOURCE_FILE} ${{ inputs.unit_test_args }} + "$PYINST_DIR/dist/onefile/${EXE_NAME}-${VER}-linux" test --with-env-source ${ENV_SOURCE_FILE} $UT_ARGS fi if [ "$INTEGRATION_TESTS" == "true" ]; then # run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build - ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux test --with-env-source ${ENV_SOURCE_FILE} ${{ inputs.integration_test_args }} --integration + "$PYINST_DIR/dist/onefile/${EXE_NAME}-${VER}-linux" test --with-env-source ${ENV_SOURCE_FILE} $IT_ARGS --integration fi + env: + PYINST_DIR: ${{ inputs.pyinstaller_dir }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + UNIT_TESTS: ${{ inputs.unit_tests }} + INTEGRATION_TESTS: ${{ inputs.integration_tests }} + EXE_NAME: ${{ inputs.executable_name }} + VER: ${{ needs.status.outputs.version }} + LOG_LEVEL: ${{ inputs.logLevel }} + UT_ARGS: ${{ inputs.unit_test_args }} + IT_ARGS: ${{ inputs.integration_test_args }} + THE_USER: ${{ steps.user.outputs.user }} - name: Build executable (folder) within Docker id: linux_onedir @@ -575,7 +625,12 @@ jobs: image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home - --env GH_TOKEN=${{ secrets.GITHUB_TOKEN }} + --env GH_TOKEN + --env EXE_NAME + --env LOG_LEVEL + --env PYINST_DIR + --env VER + --env UT_ARGS run: | set -e # exit on first failure @@ -586,26 +641,33 @@ jobs: # Configure the app's Python environment # this allows us to run integration tests that use `script_data_in/out: "direct"` - poetry run ${{ inputs.executable_name }} env setup python --use-current - ENV_SOURCE_FILE=$(poetry run ${{ inputs.executable_name }} env info source_file -l python) + poetry run "$EXE_NAME" env setup python --use-current + ENV_SOURCE_FILE=$(poetry run "$EXE_NAME" env info source_file -l python) echo "ENV_SOURCE_FILE=${ENV_SOURCE_FILE}" # build with pyinstaller for Rocky Linux (folder) - cd ${{ inputs.pyinstaller_dir }} - ./make.sh ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir ${{ inputs.logLevel }} onedir + cd "$PYINST_DIR" + ./make.sh "${EXE_NAME}-${VER}-linux-dir" "$LOG_LEVEL" onedir cd .. # install cache data - poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data - poetry run ${{ inputs.executable_name }} data --list - poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs - poetry run ${{ inputs.executable_name }} program --list + poetry run "$EXE_NAME" data install-cache "${EXE_NAME}-app-data-cache/data" + poetry run "$EXE_NAME" data --list + poetry run "$EXE_NAME" program install-cache "${EXE_NAME}-app-data-cache/programs" + poetry run "$EXE_NAME" program --list export PYTHONUNBUFFERED=ok if [ "$UNIT_TESTS" == "true" ]; then # run test suite on the frozen app (folder) - ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir test --with-env-source ${ENV_SOURCE_FILE} ${{ inputs.unit_test_args }} + "${PYINST_DIR}/dist/onedir/${EXE_NAME}-${VER}-linux-dir/${EXE_NAME}-${VER}-linux-dir" test --with-env-source ${ENV_SOURCE_FILE} $UT_ARGS fi + env: + PYINST_DIR: ${{ inputs.pyinstaller_dir }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + EXE_NAME: ${{ inputs.executable_name }} + LOG_LEVEL: ${{ inputs.logLevel }} + VER: ${{ needs.status.outputs.version }} + UT_ARGS: ${{ inputs.unit_test_args }} - name: Upload executable artifact (file) id: upload-file diff --git a/.github/workflows/doc-build-impl.yml b/.github/workflows/doc-build-impl.yml index f36f19a..cb79724 100644 --- a/.github/workflows/doc-build-impl.yml +++ b/.github/workflows/doc-build-impl.yml @@ -111,14 +111,18 @@ jobs: version: ${{ inputs.python-version }} - name: Install Dependencies run: | - poetry install ${{ inputs.install-args }} + poetry install $Args + env: + Args: ${{ inputs.install-args }} - name: Configure Problem Matcher run: echo "::add-matcher::github-support/problem-matchers/sphinx.json" # See: https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md # See: https://github.com/python/cpython/pull/20325 - name: Run Sphinx run: | - poetry run make clean html ${{ inputs.sphinx-args }} + poetry run make clean html $Args + env: + Args: ${{ inputs.sphinx-args }} working-directory: docs - name: Upload documentation artifact id: upload diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index b80562e..92ddb21 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -260,22 +260,25 @@ jobs: - name: Rebase into develop branch if exists (stable release) if: inputs.pr-base-ref == inputs.release_branch run: | - exists_in_remote=$(git ls-remote --heads origin refs/heads/${{ inputs.pre_release_branch }}) + exists_in_remote=$(git ls-remote --heads origin "refs/heads/$PRE_BRANCH") echo "exists_in_remote: $exists_in_remote" if [[ -n $exists_in_remote ]]; then export SKIP=end-of-file-fixer - git checkout ${{ inputs.pre_release_branch }} + git checkout "$PRE_BRANCH" git pull - git rebase ${{ inputs.release_branch }} - git push -u origin ${{ inputs.pre_release_branch }} + git rebase "$BASE_BRANCH" + git push -u origin "$PRE_BRANCH" else - echo "No ${{ inputs.pre_release_branch }} branch to merge into." + echo "No $PRE_BRANCH branch to merge into." fi + env: + PRE_BRANCH: ${{ inputs.pre_release_branch }} + BASE_BRANCH: ${{ inputs.release_branch }} - name: Generate incremental CHANGELOG for GitHub release body (stable release) if: inputs.pr-base-ref == inputs.release_branch run: | - ./git-chglog --template .chglog/RELEASE.tpl.md --output CHANGELOG_increment.md $cur_tag.. + ./git-chglog --template .chglog/RELEASE.tpl.md --output CHANGELOG_increment.md "$cur_tag.."" cat CHANGELOG_increment.md env: cur_tag: ${{ steps.cur_tag.outputs.tag }} @@ -284,7 +287,7 @@ jobs: - name: Generate incremental CHANGELOG for GitHub release body (pre-release) if: inputs.pr-base-ref == inputs.pre_release_branch run: | - ./git-chglog --template .chglog/RELEASE.tpl.md --output CHANGELOG_increment.md $new_tag + ./git-chglog --template .chglog/RELEASE.tpl.md --output CHANGELOG_increment.md "$new_tag" cat CHANGELOG_increment.md env: new_tag: ${{ steps.new_tag.outputs.tag }} @@ -332,7 +335,9 @@ jobs: - name: Cache all app data and programs run: | - poetry run ${{ inputs.executable_name }} manage cache-all + poetry run "$EXE_NAME" manage cache-all + env: + EXE_NAME: ${{ inputs.executable_name }} - name: Upload all cached app data/programs id: upload-cached-app-data @@ -395,11 +400,12 @@ jobs: - name: Install cached app data env: PYTHONUTF8: 1 + EXE_NAME: ${{ inputs.executable_name }} run: | - poetry run ${{ inputs.executable_name }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data - poetry run ${{ inputs.executable_name }} data --list - poetry run ${{ inputs.executable_name }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs - poetry run ${{ inputs.executable_name }} program --list + poetry run "$EXE_NAME" data install-cache "${EXE_NAME}-app-data-cache/data" + poetry run "$EXE_NAME" data --list + poetry run "$EXE_NAME" program install-cache "${EXE_NAME}-app-data-cache/programs" + poetry run "$EXE_NAME" program --list - name: Build with pyinstaller (non-Windows, file) if: runner.os != 'Windows' @@ -507,7 +513,7 @@ jobs: image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home - --env GH_TOKEN=${{ secrets.general-token }} + --env GH_TOKEN --env BUILT_EXE_PATH_FILE --env EXE_NAME run: | # set up poetry cd /home @@ -527,10 +533,10 @@ jobs: [ "$vers" = "$vers_expected" ] # install cache data - ${{ env.BUILT_EXE_PATH_FILE }} data install-cache ${{ inputs.executable_name }}-app-data-cache/data - ${{ env.BUILT_EXE_PATH_FILE }} data --list - ${{ env.BUILT_EXE_PATH_FILE }} program install-cache ${{ inputs.executable_name }}-app-data-cache/programs - ${{ env.BUILT_EXE_PATH_FILE }} program --list + "$BUILT_EXE_PATH_FILE" data install-cache "${EXE_NAME}-app-data-cache/data" + "$BUILT_EXE_PATH_FILE" data --list + "$BUILT_EXE_PATH_FILE" program install-cache "${EXE_NAME}-app-data-cache/programs" + "$BUILT_EXE_PATH_FILE" program --list # run test suite on the frozen app (file) ${{ env.BUILT_EXE_PATH_FILE }} test @@ -553,6 +559,9 @@ jobs: cd ${{ inputs.pyinstaller_dir }} ./compress.sh ${{ env.BUILT_EXE_BASE_NAME }}-linux-dir 'onedir' cd .. + env: + GH_TOKEN: ${{ secrets.general-token }} + EXE_NAME: ${{ inputs.executable_name }} - name: Upload executable artifact (file) uses: actions/upload-artifact@v7 @@ -610,7 +619,12 @@ jobs: - name: Run app make workflow command run: | - poetry run ${{ inputs.executable_name }} --timeit-file benchmark_make_workflow_${{ matrix.num_elements }}_elements-${{ runner.os }}-py-${{ matrix.python-version }}.txt make ${{ inputs.benchmark_make_workflow }} --var N ${{ matrix.num_elements }} + poetry run "$EXE_NAME" --timeit-file "benchmark_make_workflow_${N_ELEM}_elements-${RUNNER_OS}-py-${PY_VER}.txt" make "$BENCHMARK" --var N "$N_ELEM" + env: + BENCHMARK: ${{ inputs.benchmark_make_workflow }} + EXE_NAME: ${{ inputs.executable_name }} + PY_VER: ${{ matrix.python-version }} + N_ELEM: ${{ matrix.num_elements }} - name: Store benchmark data uses: actions/upload-artifact@v7 @@ -731,27 +745,33 @@ jobs: - name: Release info id: get_binary_download_links run: | - binaryYaml=$(python3 -c " + EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) + python3 -c " + import os out_yaml = '' - exe_base = '${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-' - url_base = 'https://github.com/${{ inputs.repository }}/releases/download/${{ needs.bump-version.outputs.new_tag }}/' + exe_base = os.environ['EXE_BASE'] + url_base = os.environ['URL_BASE'] + eof = os.environ['EOF'] for i in ['win.exe', 'macOS', 'linux', 'win-dir.zip', 'macOS-dir.zip', 'linux-dir.zip']: exe_name = f'{exe_base}{i}' out_yaml += f'{exe_name}: {url_base}{exe_name}\n' - print(out_yaml) - ") # Save multiline output - EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) - echo "binary_download_links<<$EOF" >> $GITHUB_OUTPUT - echo "$binaryYaml" >> $GITHUB_OUTPUT - echo "$EOF" >> $GITHUB_OUTPUT + with open(os.environ['GITHUB_OUTPUT'], 'a') as f: + f.write(f'binary_download_links<<{eof}\n{out_yaml}{eof}\n') + " + env: + EXE_BASE: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}- + URL_BASE: https://github.com/${{ inputs.repository }}/releases/download/${{ needs.bump-version.outputs.new_tag }}/ - name: Publish (to ${{ inputs.pypi-url }}) id: publish run: | - poetry config repositories.pypi ${{ inputs.pypi-url }} - poetry config pypi-token.pypi ${{ secrets.pypi-token }} + poetry config repositories.pypi "$URL" + poetry config pypi-token.pypi "$TOKEN" poetry publish --repository pypi + env: + URL: ${{ inputs.pypi-url }} + TOKEN: ${{ secrets.pypi-token }} build-documentation: needs: release-github-PyPI @@ -775,25 +795,30 @@ jobs: - name: Write binary links YAML file and push run: | - echo -e "${{ needs.release-github-PyPI.outputs.binary_download_links }}" > docs/source/released_binaries.yml + echo -e "$BIN_LINKS" > docs/source/released_binaries.yml git add . git commit -m "build: update binary download links file [skip ci]" git push + env: + BIN_LINKS: ${{ needs.release-github-PyPI.outputs.binary_download_links }} - name: Rebase into develop branch if exists (stable release) if: inputs.pr-base-ref == inputs.release_branch run: | - exists_in_remote=$(git ls-remote --heads origin refs/heads/${{ inputs.pre_release_branch }}) + exists_in_remote=$(git ls-remote --heads origin "refs/heads/$PRE_BRANCH") echo "exists_in_remote: $exists_in_remote" if [[ -n $exists_in_remote ]]; then export SKIP=end-of-file-fixer - git checkout ${{ inputs.pre_release_branch }} + git checkout "$PRE_BRANCH" git pull - git rebase ${{ inputs.release_branch }} - git push -u origin ${{ inputs.pre_release_branch }} + git rebase "$BASE_BRANCH" + git push -u origin "$PRE_BRANCH" else - echo "No ${{ inputs.pre_release_branch }} branch to merge into." + echo "No $PRE_BRANCH branch to merge into." fi + env: + PRE_BRANCH: ${{ inputs.pre_release_branch }} + BASE_BRANCH: ${{ inputs.release_branch }} - name: Cache dependencies uses: hpcflow/github-support/init-cache@0.5 @@ -850,21 +875,26 @@ jobs: - name: Update stable docs symlink if: inputs.pr-base-ref == inputs.release_branch run: | - ln -sfn ${{ needs.bump-version.outputs.new_tag }} docs/stable + ln -sfn "$TAG" docs/stable + env: + TAG: ${{ needs.bump-version.outputs.new_tag }} - name: Update pre-release docs symlink if: inputs.pr-base-ref == inputs.pre_release_branch run: | - ln -sfn ${{ needs.bump-version.outputs.new_tag }} docs/dev + ln -sfn "$TAG" docs/dev + env: + TAG: ${{ needs.bump-version.outputs.new_tag }} - run: tree - name: Update doc version switcher run: | - curl $URL --output docs/make_vers_switcher.py - python docs/make_vers_switcher.py ${{ inputs.docs_url_prefix }} + curl "$URL" --output docs/make_vers_switcher.py + python docs/make_vers_switcher.py "$DOC_PREFIX" env: URL: https://raw.githubusercontent.com/${{ inputs.repository }}/${{ github.ref_name }}/docs/make_vers_switcher.py + DOC_PREFIX: ${{ inputs.docs_url_prefix }} - name: Push changes id: publish diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index 904e83d..dbb0d51 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -290,8 +290,10 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYTHONUNBUFFERED: ok EXE_NAME: ${{ inputs.executable_name }} + PYTEST_ARGS: ${{ inputs.pytest_args }} + UT_ARGS: ${{ inputs.unit_test_args }} run: | - poetry run "$EXE_NAME" test ${{ inputs.pytest_args }} ${{ inputs.unit_test_args }} + poetry run "$EXE_NAME" test $PYTEST_ARGS $UT_ARGS test-units-RockyLinux: needs: [pre-commit, cache-app-data] From f8942727b043a6e83f1adc8ef4996e505cfd887a Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Mon, 18 May 2026 15:11:57 +0100 Subject: [PATCH 04/21] Reducing template problems --- .github/workflows/build-exes-impl.yml | 16 ++++++++++----- .github/workflows/release-impl.yml | 28 +++++++++++++++------------ 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 9b768de..56d1282 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -327,9 +327,9 @@ jobs: PYTHONUTF8: 1 EXE_NAME: ${{ inputs.executable_name }} run: | - poetry run $env:EXE_NAME data install-cache ${{ inputs.executable_name }}-app-data-cache/data + poetry run $env:EXE_NAME data install-cache "$($env:EXE_NAME)-app-data-cache/data" poetry run $env:EXE_NAME data --list - poetry run $env:EXE_NAME program install-cache ${{ inputs.executable_name }}-app-data-cache/programs + poetry run $env:EXE_NAME program install-cache "$(env:EXE_NAME)-app-data-cache/programs" poetry run $env:EXE_NAME program --list - name: Run test suite on the frozen app (file) @@ -339,8 +339,10 @@ jobs: PYTHONUNBUFFERED: ok PYTHONUTF8: 1 EXE_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe + ENV_SRC: ${{ steps.configure_python_env.outputs.env_source_file }} + ARGS: ${{ inputs.unit_test_args }} run: | - $env:EXE_FILE test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.unit_test_args }} + $env:EXE_FILE test --with-env-source $env:ENV_SRC $env:ARGS - name: Run test suite on the frozen app (folder) if: steps.win_onedir.outcome == 'success' && inputs.unit_tests == 'true' @@ -349,8 +351,10 @@ jobs: PYTHONUNBUFFERED: ok PYTHONUTF8: 1 EXE_FILE: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir.exe + ENV_SRC: ${{ steps.configure_python_env.outputs.env_source_file }} + ARGS: ${{ inputs.unit_test_args }} run: | - $env:EXE_FILE test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.unit_test_args }} + $env:EXE_FILE test --with-env-source $env:ENV_SRC $env:ARGS - name: Run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build if: steps.win_onefile.outcome == 'success' && inputs.integration_tests == 'true' @@ -359,8 +363,10 @@ jobs: PYTHONUNBUFFERED: ok PYTHONUTF8: 1 EXE_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe + ENV_SRC: ${{ steps.configure_python_env.outputs.env_source_file }} + ARGS: ${{ inputs.integration_test_args }} run: | - $env:EXE_FILE test --with-env-source ${{ steps.configure_python_env.outputs.env_source_file }} ${{ inputs.integration_test_args }} --integration + $env:EXE_FILE test --with-env-source $env:ENV_SRC $env:ARGS --integration macos: name: Build macOS Executables diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index 92ddb21..b6c5db3 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -513,21 +513,23 @@ jobs: image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home - --env GH_TOKEN --env BUILT_EXE_PATH_FILE --env EXE_NAME + --env GH_TOKEN --env BUILT_EXE_PATH_FILE --env EXE_NAME --env PYINST_DIR --env BUILT_EXE_BASE_NAME --env BUILT_EXE_PATH_DIR + --env EXPECTED run: | + vers_expected="$EXPECTED" + # set up poetry cd /home poetry config virtualenvs.in-project true poetry install --without dev - vers_expected="${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" # build with pyinstaller for Rocky Linux (file) - cd ${{ inputs.pyinstaller_dir }} - ./make.sh ${{ env.BUILT_EXE_BASE_NAME }}-linux INFO onefile + cd "$PYINST_DIR" + ./make.sh "${BUILT_EXE_BASE_NAME}-linux" INFO onefile cd .. # version check (file) - vers=$(${{ env.BUILT_EXE_PATH_FILE }} --version) + vers=$("$BUILT_EXE_PATH_FILE" --version) echo $vers echo $vers_expected [ "$vers" = "$vers_expected" ] @@ -539,29 +541,31 @@ jobs: "$BUILT_EXE_PATH_FILE" program --list # run test suite on the frozen app (file) - ${{ env.BUILT_EXE_PATH_FILE }} test + "$BUILT_EXE_PATH_FILE" test # build with pyinstaller for Rocky Linux (folder) - cd ${{ inputs.pyinstaller_dir }} - ./make.sh ${{ env.BUILT_EXE_BASE_NAME }}-linux-dir INFO onedir + cd "$PYINST_DIR" + ./make.sh "${BUILT_EXE_BASE_NAME}-linux-dir" INFO onedir cd .. # version check (folder) - vers=$(${{ env.BUILT_EXE_PATH_DIR }} --version) + vers=$("$BUILT_EXE_PATH_DIR" --version) echo $vers echo $vers_expected [ "$vers" = "$vers_expected" ] # run test suite on the frozen app (folder) - ${{ env.BUILT_EXE_PATH_DIR }} test + "$BUILT_EXE_PATH_DIR" test # Compress folder (folder) - cd ${{ inputs.pyinstaller_dir }} - ./compress.sh ${{ env.BUILT_EXE_BASE_NAME }}-linux-dir 'onedir' + cd "$PYINST_DIR" + ./compress.sh "${BUILT_EXE_BASE_NAME}-linux-dir" 'onedir' cd .. env: GH_TOKEN: ${{ secrets.general-token }} EXE_NAME: ${{ inputs.executable_name }} + PYINST_DIR: ${{ inputs.pyinstaller_dir }} + EXPECTED: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" - name: Upload executable artifact (file) uses: actions/upload-artifact@v7 From c3e02696e7773f89e65b3bd5d6e2238c94c560a5 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Mon, 18 May 2026 15:56:57 +0100 Subject: [PATCH 05/21] Tweaks --- .github/workflows/build-exes-impl.yml | 18 +++++++++----- .github/workflows/release-impl.yml | 35 +++++++++++++++------------ 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 56d1282..3563560 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -280,13 +280,19 @@ jobs: id: win_onefile if: inputs.build_onefile == 'true' working-directory: ${{ inputs.pyinstaller_dir }} - run: ./make.ps1 -ExeName "${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win" -LogLevel ${{ inputs.logLevel }} -BuildType 'onefile' + run: ./make.ps1 -ExeName "$env:EXE_NAME" -LogLevel "env:LOG_LEVEL" -BuildType 'onefile' + env: + EXE_NAME: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win + LOG_LEVEL: ${{ inputs.logLevel }} - name: Build with pyinstaller for Windows (folder) id: win_onedir if: inputs.build_onedir == 'true' working-directory: ${{ inputs.pyinstaller_dir }} - run: ./make.ps1 -ExeName "${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir" -LogLevel ${{ inputs.logLevel }} -BuildType 'onedir' + run: ./make.ps1 -ExeName "$env:EXE_NAME" -LogLevel "$env:LOG_LEVEL" -BuildType 'onedir' + env: + EXE_NAME: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir + LOG_LEVEL: ${{ inputs.logLevel }} - name: Upload executable artifact (file) id: upload-file @@ -342,7 +348,7 @@ jobs: ENV_SRC: ${{ steps.configure_python_env.outputs.env_source_file }} ARGS: ${{ inputs.unit_test_args }} run: | - $env:EXE_FILE test --with-env-source $env:ENV_SRC $env:ARGS + "$env:EXE_FILE" test --with-env-source "$env:ENV_SRC" $env:ARGS - name: Run test suite on the frozen app (folder) if: steps.win_onedir.outcome == 'success' && inputs.unit_tests == 'true' @@ -354,7 +360,7 @@ jobs: ENV_SRC: ${{ steps.configure_python_env.outputs.env_source_file }} ARGS: ${{ inputs.unit_test_args }} run: | - $env:EXE_FILE test --with-env-source $env:ENV_SRC $env:ARGS + "$env:EXE_FILE" test --with-env-source "$env:ENV_SRC" $env:ARGS - name: Run integration test suite on the frozen app (file) # tests are more likely to fail in the one-file build than the one-dir build, so just run integration tests with the one-file build if: steps.win_onefile.outcome == 'success' && inputs.integration_tests == 'true' @@ -366,7 +372,7 @@ jobs: ENV_SRC: ${{ steps.configure_python_env.outputs.env_source_file }} ARGS: ${{ inputs.integration_test_args }} run: | - $env:EXE_FILE test --with-env-source $env:ENV_SRC $env:ARGS --integration + "$env:EXE_FILE" test --with-env-source "$env:ENV_SRC" $env:ARGS --integration macos: name: Build macOS Executables @@ -559,7 +565,7 @@ jobs: if: inputs.build_onefile == 'true' uses: addnab/docker-run-action@v3 with: - image: ghcr.io/hpcflow/rockylinux8-python:latest # most of the options are just so we can debug (via tmate) when we have a custom pytest --basetemp directory + image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home -u $THE_USER diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index b6c5db3..cdea567 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -215,19 +215,21 @@ jobs: - name: Commitizen bump # First update version number to latest stable release, then bump to new stable release, add a new tag and commit if: inputs.pr-base-ref == inputs.release_branch run: | - python3 -c " + python3 -c ' from commitizen.bump import update_version_in_files + import os update_version_in_files( - current_version='$pre_tag'.lstrip('v'), - new_version='$cur_tag'.lstrip('v'), - version_files=['pyproject.toml', '${{ inputs.version_file }}'], + current_version=os.environ["pre_tag"].lstrip("v"), + new_version=os.environ["cur_tag"].lstrip("v"), + version_files=["pyproject.toml", os.environ["ver_file"]], check_consistency=False, - encoding='utf-8', - )" + encoding="utf-8", + )' cz bump env: pre_tag: ${{ steps.pre_tag.outputs.tag }} cur_tag: ${{ steps.cur_tag.outputs.tag }} + ver_file: ${{ inputs.version_file }} - name: Get new tag id: new_tag @@ -458,7 +460,9 @@ jobs: - name: Compress folder (windows, folder) if: runner.os == 'Windows' working-directory: ${{ inputs.pyinstaller_dir }} - run: ./compress.ps1 -ExeName '${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir' -BuildType 'onedir' + run: ./compress.ps1 -ExeName "$env:TARGET" -BuildType 'onedir' + env: + TARGET: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir - name: Compress folder (non-windows, folder) if: runner.os != 'Windows' @@ -748,21 +752,20 @@ jobs: - name: Release info id: get_binary_download_links + shell: python run: | - EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) - python3 -c " import os - out_yaml = '' + import string + import random exe_base = os.environ['EXE_BASE'] url_base = os.environ['URL_BASE'] + eof = ''.join(random.choices(string.ascii_uppercase + string.digits, k=24)) eof = os.environ['EOF'] - for i in ['win.exe', 'macOS', 'linux', 'win-dir.zip', 'macOS-dir.zip', 'linux-dir.zip']: - exe_name = f'{exe_base}{i}' - out_yaml += f'{exe_name}: {url_base}{exe_name}\n' - # Save multiline output with open(os.environ['GITHUB_OUTPUT'], 'a') as f: - f.write(f'binary_download_links<<{eof}\n{out_yaml}{eof}\n') - " + f.write(f'binary_download_links<<{eof}\n') + for suffix in ['win.exe', 'macOS', 'linux', 'win-dir.zip', 'macOS-dir.zip', 'linux-dir.zip']: + f.write(f'{exe_base}{suffix}: {url_base}{exe_base}{suffix}\n') + f.write(f'{eof}\n') env: EXE_BASE: ${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}- URL_BASE: https://github.com/${{ inputs.repository }}/releases/download/${{ needs.bump-version.outputs.new_tag }}/ From 8fdc5593429f16a239c60dea1e963fc8914e0b10 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Mon, 18 May 2026 16:37:07 +0100 Subject: [PATCH 06/21] Commit ID binding --- .github/workflows/benchmark-impl.yml | 16 +-- .github/workflows/build-exes-impl.yml | 74 ++++++------- .github/workflows/doc-build-impl.yml | 20 ++-- .github/workflows/release-impl.yml | 98 ++++++++--------- .github/workflows/test-impl.yml | 116 ++++++++++----------- .github/workflows/test-pre-python-impl.yml | 8 +- 6 files changed, 166 insertions(+), 166 deletions(-) diff --git a/.github/workflows/benchmark-impl.yml b/.github/workflows/benchmark-impl.yml index b935b9c..49fceb7 100644 --- a/.github/workflows/benchmark-impl.yml +++ b/.github/workflows/benchmark-impl.yml @@ -58,20 +58,20 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: benchmark version: ${{ matrix.python-version }} @@ -100,7 +100,7 @@ jobs: shell: bash - name: Store benchmark file - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ steps.vars.outputs.timeit }} path: ${{ steps.vars.outputs.timeit }} @@ -116,17 +116,17 @@ jobs: run: | mkdir benchmarks - name: Fetch benchmark data - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: merge-multiple: true path: benchmarks - name: Delete partial benchmark data - uses: geekyeggo/delete-artifact@v6 + uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0 with: name: "*" failOnError: false - name: Store benchmark data archive - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 id: upload with: name: benchmarks diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 3563560..322bef0 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -142,7 +142,7 @@ jobs: sha: ${{ steps.info.outputs.sha }} steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: fetch-depth: 0 # get all history and tags persist-credentials: false @@ -167,23 +167,23 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ needs.status.outputs.sha }} persist-credentials: false - name: Set up python - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ inputs.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: test version: ${{ inputs.python-version }} @@ -216,7 +216,7 @@ jobs: - name: Upload all cached app data/programs id: upload-cached-app-data - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-app-data-cache path: ~/.cache/${{ inputs.executable_name }} @@ -233,34 +233,34 @@ jobs: runs-on: windows-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: persist-credentials: false - name: Setup tmate session if: inputs.tmate_debugging == 'true' - uses: mxschmitt/action-tmate@v3 + uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3.23 with: detached: true - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ inputs.python-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: build-exe version: ${{ inputs.python-version }} - name: Download prepared cached app data - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ inputs.executable_name }}-app-data-cache path: ${{ inputs.executable_name }}-app-data-cache - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: version: ${{ inputs.poetry-version }} @@ -297,7 +297,7 @@ jobs: - name: Upload executable artifact (file) id: upload-file if: steps.win_onefile.outcome == 'success' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe path: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.exe @@ -306,7 +306,7 @@ jobs: - name: Upload executable artifact (folder) id: upload-folder if: steps.win_onedir.outcome == 'success' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir path: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-dir @@ -314,7 +314,7 @@ jobs: - name: Upload spec file if: steps.win_onefile.outcome == 'success' || steps.win_onedir.outcome == 'success' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.spec path: ${{ inputs.pyinstaller_dir }}/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win.spec @@ -322,7 +322,7 @@ jobs: - name: Upload build directory if: steps.win_onefile.outcome == 'success' || steps.win_onedir.outcome == 'success' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win-build path: ${{ inputs.pyinstaller_dir }}/build/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-win @@ -385,34 +385,34 @@ jobs: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: persist-credentials: false - name: Setup tmate session if: inputs.tmate_debugging == 'true' - uses: mxschmitt/action-tmate@v3 + uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3.23 with: detached: true - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ inputs.python-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: build-exe version: ${{ inputs.python-version }} - name: Download prepared cached app data - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ inputs.executable_name }}-app-data-cache path: ${{ inputs.executable_name }}-app-data-cache - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: version: ${{ inputs.poetry-version }} @@ -449,7 +449,7 @@ jobs: - name: Upload executable artifact (file) id: upload-file if: steps.mac_onefile.outcome == 'success' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS path: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS @@ -458,7 +458,7 @@ jobs: - name: Upload executable artifact (folder) id: upload-folder if: steps.mac_onedir.outcome == 'success' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir path: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-dir @@ -466,7 +466,7 @@ jobs: - name: Upload spec file if: steps.mac_onefile.outcome == 'success' || steps.mac_onedir.outcome == 'success' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS.spec path: ${{ inputs.pyinstaller_dir }}/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS.spec @@ -474,7 +474,7 @@ jobs: - name: Upload build directory if: steps.mac_onefile.outcome == 'success' || steps.mac_onedir.outcome == 'success' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS-build path: ${{ inputs.pyinstaller_dir }}/build/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-macOS @@ -533,24 +533,24 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: persist-credentials: false - name: Setup tmate session if: inputs.tmate_debugging == 'true' - uses: mxschmitt/action-tmate@v3 + uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3.23 with: detached: true - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: build-exe version: ${{ inputs.python-version }} - name: Download prepared cached app data - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ inputs.executable_name }}-app-data-cache path: ${{ inputs.executable_name }}-app-data-cache @@ -563,7 +563,7 @@ jobs: - name: Build executable (file) within Docker id: linux_onefile if: inputs.build_onefile == 'true' - uses: addnab/docker-run-action@v3 + uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 with: image: ghcr.io/hpcflow/rockylinux8-python:latest options: | @@ -632,7 +632,7 @@ jobs: - name: Build executable (folder) within Docker id: linux_onedir if: inputs.build_onedir == 'true' - uses: addnab/docker-run-action@v3 + uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 with: image: ghcr.io/hpcflow/rockylinux8-python:latest options: | @@ -684,7 +684,7 @@ jobs: - name: Upload executable artifact (file) id: upload-file if: steps.linux_onefile.outcome == 'success' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux path: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux @@ -693,7 +693,7 @@ jobs: - name: Upload executable artifact (folder) id: upload-folder if: steps.linux_onedir.outcome == 'success' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir path: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-dir @@ -701,7 +701,7 @@ jobs: - name: Upload spec file if: steps.linux_onefile.outcome == 'success' || steps.linux_onedir.outcome == 'success' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux.spec path: ${{ inputs.pyinstaller_dir }}/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux.spec @@ -709,7 +709,7 @@ jobs: - name: Upload build directory if: steps.linux_onefile.outcome == 'success' || steps.linux_onedir.outcome == 'success' - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux-build path: ${{ inputs.pyinstaller_dir }}/build/${{ inputs.executable_name }}-${{ needs.status.outputs.version }}-linux @@ -723,7 +723,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Delete cache artifact - uses: geekyeggo/delete-artifact@v6 + uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0 with: name: "*-app-data-cache" failOnError: false diff --git a/.github/workflows/doc-build-impl.yml b/.github/workflows/doc-build-impl.yml index cb79724..6d9a7bd 100644 --- a/.github/workflows/doc-build-impl.yml +++ b/.github/workflows/doc-build-impl.yml @@ -85,27 +85,27 @@ jobs: artifact-url: ${{ steps.upload.outputs.artifact-url }} steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Checkout support code - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: repository: hpcflow/github-support path: github-support ref: ${{ inputs.script-branch }} persist-credentials: false - name: Init Python ${{ inputs.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ inputs.python-version }} - name: Install and configure poetry ${{ inputs.poetry-version }} - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: version: ${{ inputs.poetry-version }} - name: Cache Virtual Environment - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: sphinx version: ${{ inputs.python-version }} @@ -126,7 +126,7 @@ jobs: working-directory: docs - name: Upload documentation artifact id: upload - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.artifact-root-name }}-documentation (${{ inputs.ref }}) path: docs/build/html @@ -152,17 +152,17 @@ jobs: page-url: ${{ steps.deployment.outputs.page_url }} steps: - name: Download documentation artifact - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: path: site merge-multiple: true - name: Setup GitHub Pages - uses: actions/configure-pages@v6 + uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 - name: Upload artifact to documentation staging - uses: actions/upload-pages-artifact@v5 + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 with: # Upload dist repository path: site - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v5 + uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index cdea567..6f6e9be 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -170,16 +170,16 @@ jobs: changelog: ${{ steps.upload-changelog.outputs.artifact-url }} steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: fetch-depth: 0 # get all history and tags ref: ${{ inputs.pr-base-ref }} token: ${{ secrets.commit-token }} persist-credentials: true - name: Configure git - uses: hpcflow/github-support/configure-git@0.5 + uses: hpcflow/github-support/configure-git@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ inputs.python-version }} @@ -295,7 +295,7 @@ jobs: new_tag: ${{ steps.new_tag.outputs.tag }} - name: Store the incremental CHANGELOG - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 id: upload-changelog with: name: CHANGELOG_increment @@ -310,23 +310,23 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.pr-base-ref }} persist-credentials: false - name: Set up python - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ inputs.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: test version: ${{ inputs.python-version }} @@ -343,7 +343,7 @@ jobs: - name: Upload all cached app data/programs id: upload-cached-app-data - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-app-data-cache path: ~/.cache/${{ inputs.executable_name }} @@ -371,28 +371,28 @@ jobs: BUILT_EXE_PATH_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}${{ matrix.executable_ext }} steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.pr-base-ref }} # otherwise we get the ref when the workflow started (missing above commit) persist-credentials: false - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ inputs.python-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: build version: ${{ inputs.python-version }} - name: Download prepared cached app data - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ inputs.executable_name }}-app-data-cache path: ${{ inputs.executable_name }}-app-data-cache - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: version: ${{ inputs.poetry-version }} @@ -438,14 +438,14 @@ jobs: TARGET: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir - name: Version check (file) - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: expected: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" command: | "$BUILT_EXE_PATH_FILE" --version - name: Version check (folder) - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: expected: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" command: | @@ -472,14 +472,14 @@ jobs: TARGET: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir - name: Upload executable artifact (file) - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}${{ matrix.executable_ext }} path: ${{ env.BUILT_EXE_PATH_FILE }} retention-days: 7 - name: Upload executable artifact (compressed folder) - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir.zip path: ${{ env.BUILT_EXE_PATH_DIR_ZIPPED }} @@ -495,24 +495,24 @@ jobs: BUILT_EXE_PATH_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-linux steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.pr-base-ref }} # otherwise we get the ref when the workflow started (missing above commit) persist-credentials: false - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: build version: ${{ inputs.python-version }} - name: Download prepared cached app data - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ inputs.executable_name }}-app-data-cache path: ${{ inputs.executable_name }}-app-data-cache - name: Build executables within Docker - uses: addnab/docker-run-action@v3 + uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 with: image: ghcr.io/hpcflow/rockylinux8-python:latest options: | @@ -572,14 +572,14 @@ jobs: EXPECTED: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" - name: Upload executable artifact (file) - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ env.BUILT_EXE_BASE_NAME }}-linux path: ${{ env.BUILT_EXE_PATH_FILE }} retention-days: 7 - name: Upload executable artifact (compressed folder) - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ env.BUILT_EXE_BASE_NAME }}-linux-dir.zip path: ${{ inputs.pyinstaller_dir }}/dist/onedir/${{ env.BUILT_EXE_BASE_NAME }}-linux-dir.zip @@ -603,20 +603,20 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ github.ref }} persist-credentials: false - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: benchmark version: ${{ matrix.python-version }} @@ -635,7 +635,7 @@ jobs: N_ELEM: ${{ matrix.num_elements }} - name: Store benchmark data - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: benchmark_make_workflow_${{ matrix.num_elements }}_elements-${{ runner.os }}-py-${{ matrix.python-version }}.txt path: benchmark_make_workflow_${{ matrix.num_elements }}_elements-${{ runner.os }}-py-${{ matrix.python-version }}.txt @@ -648,7 +648,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Delete cache artifact - uses: geekyeggo/delete-artifact@v6 + uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0 with: name: "*-app-data-cache" failOnError: false @@ -662,7 +662,7 @@ jobs: benchmark-url: ${{ steps.upload.outputs.artifact-url }} steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ github.ref }} persist-credentials: false @@ -670,7 +670,7 @@ jobs: run: | mkdir benchmarks - name: Load benchmark data - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: merge-multiple: true path: benchmarks @@ -678,7 +678,7 @@ jobs: run: | zip -r ./benchmarks.zip benchmarks - name: Store compound benchmark data - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: benchmarks.zip path: benchmarks.zip @@ -699,21 +699,21 @@ jobs: contents: write steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.pr-base-ref }} # otherwise we get the ref when the workflow started (missing above commit) persist-credentials: false - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ inputs.python-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: release version: ${{ inputs.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: version: ${{ inputs.poetry-version }} @@ -727,7 +727,7 @@ jobs: run: mkdir release-artifacts - name: Download release artifacts - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: path: release-artifacts @@ -736,7 +736,7 @@ jobs: - name: Release id: release - uses: softprops/action-gh-release@v3 + uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0 with: body_path: release-artifacts/CHANGELOG_increment/CHANGELOG_increment.md tag_name: ${{ needs.bump-version.outputs.new_tag }} @@ -785,7 +785,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: fetch-depth: 0 # get all history and tags ref: ${{ inputs.pr-base-ref }} # otherwise we get the ref when the workflow started (missing above commit) @@ -793,10 +793,10 @@ jobs: persist-credentials: false - name: Configure git - uses: hpcflow/github-support/configure-git@0.5 + uses: hpcflow/github-support/configure-git@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ inputs.python-version }} @@ -828,12 +828,12 @@ jobs: BASE_BRANCH: ${{ inputs.release_branch }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: release-doc version: ${{ inputs.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: version: ${{ inputs.poetry-version }} @@ -847,7 +847,7 @@ jobs: working-directory: docs - name: Upload documentation artifact - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: docs_html path: docs/build/html @@ -859,22 +859,22 @@ jobs: publish-state: ${{ steps.publish.outcome }} steps: - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ inputs.python-version }} - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: repository: ${{ inputs.website_source_org }}/${{ inputs.website_source_repo }} token: ${{ secrets.website-token }} persist-credentials: true - name: Configure git - uses: hpcflow/github-support/configure-git@0.5 + uses: hpcflow/github-support/configure-git@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 - name: Download documentation artifact - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: docs_html path: docs/${{ needs.bump-version.outputs.new_tag }} diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index dbb0d51..8d31608 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -146,7 +146,7 @@ jobs: timeout-minutes: 2 steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: token: ${{ secrets.pre-commit-token }} # checkout PR source branch (head_ref) if event is pull_request: @@ -154,9 +154,9 @@ jobs: repository: ${{ inputs.full-repo-name }} persist-credentials: true - name: Configure git for commits - uses: hpcflow/github-support/configure-git@0.5 + uses: hpcflow/github-support/configure-git@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 - name: Set up python - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: "3.13" @@ -185,24 +185,24 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Set up python - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: "3.13" - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 timeout-minutes: ${{ inputs.install-poetry-timeout-minutes }} with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: test version: "3.13" @@ -220,7 +220,7 @@ jobs: - name: Upload all cached app data/programs id: upload-cached-app-data - uses: actions/upload-artifact@v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ inputs.executable_name }}-app-data-cache path: ~/.cache/${{ inputs.executable_name }} @@ -243,28 +243,28 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} - name: Download prepared cached app data - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ inputs.executable_name }}-app-data-cache path: ${{ inputs.executable_name }}-app-data-cache - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 timeout-minutes: ${{ inputs.install-poetry-timeout-minutes }} with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: test version: ${{ matrix.python-version }} @@ -304,24 +304,24 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: test version: RockyLinux - name: Download prepared cached app data - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ inputs.executable_name }}-app-data-cache path: ${{ inputs.executable_name }}-app-data-cache - name: Run unit tests within Docker - uses: addnab/docker-run-action@v3 + uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 with: image: ghcr.io/hpcflow/rockylinux8-python:latest options: | @@ -360,27 +360,27 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 timeout-minutes: ${{ inputs.install-poetry-timeout-minutes }} with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: test-integration version: ${{ matrix.python-version }} - name: Download prepared cached app data - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ inputs.executable_name }}-app-data-cache path: ${{ inputs.executable_name }}-app-data-cache @@ -420,24 +420,24 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: test-integration version: RockyLinux - name: Download prepared cached app data - uses: actions/download-artifact@v8 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: ${{ inputs.executable_name }}-app-data-cache path: ${{ inputs.executable_name }}-app-data-cache - name: Run integration tests within Docker - uses: addnab/docker-run-action@v3 + uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 with: image: ghcr.io/hpcflow/rockylinux8-python:latest options: | @@ -471,29 +471,29 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Checkout supporting test infrastructure - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: repository: hpcflow/github-support path: github-support ref: ${{ inputs.script-branch }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 id: poetry timeout-minutes: ${{ inputs.install-poetry-timeout-minutes }} with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: test-invocation version: ${{ matrix.python-version }} @@ -514,7 +514,7 @@ jobs: PY: ${{ steps.poetry.outputs.python-path }} - name: Test invocation command with `python ./${{ inputs.CLI_path }}` - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: source "$POETRY_PATH/bin/activate" command: python "./${CLI_PATH}" internal get-invoc-cmd @@ -524,7 +524,7 @@ jobs: CLI_PATH: ${{ inputs.CLI_path }} - name: Test invocation command with `python -m ${{ inputs.CLI_module }}` - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: source "$POETRY_PATH/bin/activate" command: python -m "$CLI_MODULE" internal get-invoc-cmd @@ -534,7 +534,7 @@ jobs: CLI_MODULE: ${{ inputs.CLI_module }} - name: Test invocation command with `${{ inputs.executable_name }}` entry point script - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: source "$POETRY_PATH/bin/activate" command: | @@ -545,7 +545,7 @@ jobs: EXE_NAME: ${{ inputs.executable_name }} - name: Test invocation command within a python script - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: source "$POETRY_PATH/bin/activate" command: python github-support/scripts/get_invoc_cmd.py "$APP_PKG" @@ -555,7 +555,7 @@ jobs: APP_PKG: ${{ inputs.app_package }} - name: Test invocation command with interactive python - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: source "$POETRY_PATH/bin/activate" command: python github-support/scripts/get_invoc_cmd_interactive.py python "$APP_PKG" @@ -565,7 +565,7 @@ jobs: APP_PKG: ${{ inputs.app_package }} - name: Test invocation command with interactive ipython - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: source "$POETRY_PATH/bin/activate" command: python github-support/scripts/get_invoc_cmd_interactive.py ipython "$APP_PKG" @@ -604,29 +604,29 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Checkout supporting test infrastructure - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: repository: hpcflow/github-support path: github-support ref: ${{ inputs.script-branch }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 id: poetry timeout-minutes: ${{ inputs.install-poetry-timeout-minutes }} with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: test-invocation version: ${{ matrix.python-version }} @@ -647,7 +647,7 @@ jobs: PY: ${{ steps.poetry.outputs.python-path }} - name: Test invocation command with `python ./${{ inputs.CLI_path }}` - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: source "$POETRY_PATH/bin/activate" command: python "./${CLI_PATH}" internal get-invoc-cmd @@ -657,7 +657,7 @@ jobs: CLI_PATH: ${{ inputs.CLI_path }} - name: Test invocation command with `python -m ${{ inputs.CLI_module }}` - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: source "$POETRY_PATH/bin/activate" command: python -m "$CLI_MODULE" internal get-invoc-cmd @@ -667,7 +667,7 @@ jobs: CLI_MODULE: ${{ inputs.CLI_module }} - name: Test invocation command with `${{ inputs.executable_name }}` entry point script - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: source "$POETRY_PATH/bin/activate" command: | @@ -678,7 +678,7 @@ jobs: EXE_NAME: ${{ inputs.executable_name }} - name: Test invocation command within a python script - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: source "$POETRY_PATH/bin/activate" command: python github-support/scripts/get_invoc_cmd.py "$APP_PKG" @@ -688,7 +688,7 @@ jobs: APP_PKG: ${{ inputs.app_package }} - name: Test invocation command with interactive python - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: source "$POETRY_PATH/bin/activate" command: python github-support/scripts/get_invoc_cmd_interactive.py python "$APP_PKG" @@ -698,7 +698,7 @@ jobs: APP_PKG: ${{ inputs.app_package }} - name: Test invocation command with interactive ipython - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: source "$POETRY_PATH/bin/activate" command: python github-support/scripts/get_invoc_cmd_interactive.py ipython "$APP_PKG" @@ -737,29 +737,29 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Checkout supporting test infrastructure - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: repository: hpcflow/github-support path: github-support ref: ${{ inputs.script-branch }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 id: poetry timeout-minutes: ${{ inputs.install-poetry-timeout-minutes }} with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: test-invocation version: ${{ matrix.python-version }} @@ -782,7 +782,7 @@ jobs: PY: ${{ steps.poetry.outputs.python-path }} - name: Test invocation command with `python ./${{ inputs.CLI_path }}` - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: ."$Env:POETRY_PATH\Scripts\activate.ps1" command: python "./$Env:CLI_PATH" internal get-invoc-cmd @@ -792,7 +792,7 @@ jobs: CLI_PATH: ${{ inputs.CLI_path }} - name: Test invocation command with `python -m ${{ inputs.CLI_module }}` - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: ."$Env:POETRY_PATH\Scripts\activate.ps1" command: python -m "$Env:CLI_MODULE" internal get-invoc-cmd @@ -802,7 +802,7 @@ jobs: CLI_MODULE: ${{ inputs.CLI_module }} - name: Test invocation command with `${{ inputs.executable_name }}` entry point script - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: ."$Env:POETRY_PATH\Scripts\activate.ps1" command: | @@ -813,7 +813,7 @@ jobs: EXE_NAME: ${{ inputs.executable_name }} - name: Test invocation command within a python script - uses: hpcflow/github-support/compare@0.5 + uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: init: ."$Env:POETRY_PATH\Scripts\activate.ps1" command: python github-support\scripts\get_invoc_cmd.py "$Env:APP_PKG" @@ -849,7 +849,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Delete cache artifact - uses: geekyeggo/delete-artifact@v6 + uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0 with: name: "*-app-data-cache" failOnError: false diff --git a/.github/workflows/test-pre-python-impl.yml b/.github/workflows/test-pre-python-impl.yml index d95bf2d..5f8fb26 100644 --- a/.github/workflows/test-pre-python-impl.yml +++ b/.github/workflows/test-pre-python-impl.yml @@ -46,22 +46,22 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v6 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true - name: Cache dependencies - uses: hpcflow/github-support/init-cache@0.5 + uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: name: test version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@0.5 + uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 with: version: ${{ inputs.poetry-version }} From b436398fb0c2cd6fc9346494e14d65c1b9dbe951 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Mon, 18 May 2026 16:54:53 +0100 Subject: [PATCH 07/21] Fix the caching action This needs a little care because what is being cached is tricky --- init-cache/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/init-cache/action.yml b/init-cache/action.yml index eca216a..88387fd 100644 --- a/init-cache/action.yml +++ b/init-cache/action.yml @@ -5,7 +5,7 @@ description: > inputs: name: description: The short name of the task having its environment cached. - required: true + required: true version: description: The version of Python this is for. required: true @@ -13,7 +13,7 @@ runs: using: composite steps: - name: Cache Virtual Environment - uses: actions/cache@v4 + uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: ./.venv - key: ${{ inputs.name }}.${{ runner.os }}-${{ inputs.version }}-venv.${{ hashFiles('**/poetry.lock') }} + key: ${{ inputs.name }}.${{ runner.os }}-${{ inputs.version }}-venv.${{ github.head_ref || github.ref_name }}.${{ hashFiles('**/poetry.lock') }} From 8d5cdc846165c884ae018dc73e5667d40e11e1ad Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Mon, 18 May 2026 16:57:16 +0100 Subject: [PATCH 08/21] Woah there, dependabot! --- .github/dependabot.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5ace460..6cc0071 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,5 @@ updates: directory: "/" schedule: interval: "weekly" + cooldown: + default-days: 7 From f873ad57b8fab15b19d75642b6ba8d92f3525744 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 11:54:22 +0100 Subject: [PATCH 09/21] Bind version of actions/checkout --- .github/workflows/benchmark-impl.yml | 2 +- .github/workflows/build-exes-impl.yml | 10 ++++----- .github/workflows/doc-build-impl.yml | 4 ++-- .github/workflows/release-impl.yml | 18 ++++++++-------- .github/workflows/test-impl.yml | 24 +++++++++++----------- .github/workflows/test-pre-python-impl.yml | 2 +- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/benchmark-impl.yml b/.github/workflows/benchmark-impl.yml index da34b46..53c6002 100644 --- a/.github/workflows/benchmark-impl.yml +++ b/.github/workflows/benchmark-impl.yml @@ -58,7 +58,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index 5f6686c..c0ba384 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -142,7 +142,7 @@ jobs: sha: ${{ steps.info.outputs.sha }} steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # get all history and tags persist-credentials: false @@ -167,7 +167,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ needs.status.outputs.sha }} persist-credentials: false @@ -233,7 +233,7 @@ jobs: runs-on: windows-latest steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false @@ -385,7 +385,7 @@ jobs: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false @@ -533,7 +533,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false diff --git a/.github/workflows/doc-build-impl.yml b/.github/workflows/doc-build-impl.yml index 779bd8f..474adfc 100644 --- a/.github/workflows/doc-build-impl.yml +++ b/.github/workflows/doc-build-impl.yml @@ -85,12 +85,12 @@ jobs: artifact-url: ${{ steps.upload.outputs.artifact-url }} steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Checkout support code - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: hpcflow/github-support path: github-support diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index a566d97..a1ed136 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -170,7 +170,7 @@ jobs: changelog: ${{ steps.upload-changelog.outputs.artifact-url }} steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # get all history and tags ref: ${{ inputs.pr-base-ref }} @@ -311,7 +311,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.pr-base-ref }} allow-unsafe-pr-checkout: true @@ -373,7 +373,7 @@ jobs: BUILT_EXE_PATH_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-${{ matrix.executable_os }}${{ matrix.executable_ext }} steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.pr-base-ref }} # otherwise we get the ref when the workflow started (missing above commit) allow-unsafe-pr-checkout: true @@ -498,7 +498,7 @@ jobs: BUILT_EXE_PATH_FILE: ${{ inputs.pyinstaller_dir }}/dist/onefile/${{ inputs.executable_name }}-${{ needs.bump-version.outputs.new_tag }}-linux steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.pr-base-ref }} # otherwise we get the ref when the workflow started (missing above commit) allow-unsafe-pr-checkout: true @@ -607,7 +607,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.ref }} allow-unsafe-pr-checkout: true @@ -667,7 +667,7 @@ jobs: benchmark-url: ${{ steps.upload.outputs.artifact-url }} steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.ref }} allow-unsafe-pr-checkout: true @@ -705,7 +705,7 @@ jobs: contents: write steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.pr-base-ref }} # otherwise we get the ref when the workflow started (missing above commit) allow-unsafe-pr-checkout: true @@ -792,7 +792,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # get all history and tags ref: ${{ inputs.pr-base-ref }} # otherwise we get the ref when the workflow started (missing above commit) @@ -872,7 +872,7 @@ jobs: python-version: ${{ inputs.python-version }} - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: ${{ inputs.website_source_org }}/${{ inputs.website_source_repo }} token: ${{ secrets.website-token }} diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index e9e4a49..84246c5 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -146,7 +146,7 @@ jobs: timeout-minutes: 2 steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: token: ${{ secrets.pre-commit-token }} # checkout PR source branch (head_ref) if event is pull_request: @@ -185,7 +185,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false @@ -243,7 +243,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false @@ -304,7 +304,7 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false @@ -360,7 +360,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false @@ -420,7 +420,7 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false @@ -471,12 +471,12 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Checkout supporting test infrastructure - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: hpcflow/github-support path: github-support @@ -604,12 +604,12 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Checkout supporting test infrastructure - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: hpcflow/github-support path: github-support @@ -737,12 +737,12 @@ jobs: contents: read steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false - name: Checkout supporting test infrastructure - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: hpcflow/github-support path: github-support diff --git a/.github/workflows/test-pre-python-impl.yml b/.github/workflows/test-pre-python-impl.yml index 7a1baf8..b4e2707 100644 --- a/.github/workflows/test-pre-python-impl.yml +++ b/.github/workflows/test-pre-python-impl.yml @@ -46,7 +46,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ inputs.ref }} persist-credentials: false From 91550cb99821ba2c1ae2b9849e855425c3fada4c Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 11:57:18 +0100 Subject: [PATCH 10/21] Bind version of actions/setup-python --- .github/workflows/benchmark-impl.yml | 2 +- .github/workflows/build-exes-impl.yml | 6 +++--- .github/workflows/doc-build-impl.yml | 2 +- .github/workflows/release-impl.yml | 14 +++++++------- .github/workflows/test-impl.yml | 14 +++++++------- .github/workflows/test-pre-python-impl.yml | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/benchmark-impl.yml b/.github/workflows/benchmark-impl.yml index 53c6002..34e84af 100644 --- a/.github/workflows/benchmark-impl.yml +++ b/.github/workflows/benchmark-impl.yml @@ -63,7 +63,7 @@ jobs: ref: ${{ inputs.ref }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} - name: Set up poetry diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index c0ba384..bb03317 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -173,7 +173,7 @@ jobs: persist-credentials: false - name: Set up python - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ inputs.python-version }} @@ -244,7 +244,7 @@ jobs: detached: true - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ inputs.python-version }} - name: Cache dependencies @@ -396,7 +396,7 @@ jobs: detached: true - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ inputs.python-version }} - name: Cache dependencies diff --git a/.github/workflows/doc-build-impl.yml b/.github/workflows/doc-build-impl.yml index 474adfc..90789a1 100644 --- a/.github/workflows/doc-build-impl.yml +++ b/.github/workflows/doc-build-impl.yml @@ -97,7 +97,7 @@ jobs: ref: ${{ inputs.script-branch }} persist-credentials: false - name: Init Python ${{ inputs.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ inputs.python-version }} - name: Install and configure poetry ${{ inputs.poetry-version }} diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index a1ed136..a9d54ac 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -180,7 +180,7 @@ jobs: - name: Configure git uses: hpcflow/github-support/configure-git@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ inputs.python-version }} @@ -318,7 +318,7 @@ jobs: persist-credentials: false - name: Set up python - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ inputs.python-version }} @@ -379,7 +379,7 @@ jobs: allow-unsafe-pr-checkout: true persist-credentials: false - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ inputs.python-version }} - name: Cache dependencies @@ -613,7 +613,7 @@ jobs: allow-unsafe-pr-checkout: true persist-credentials: false - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} - name: Set up poetry @@ -711,7 +711,7 @@ jobs: allow-unsafe-pr-checkout: true persist-credentials: false - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ inputs.python-version }} - name: Cache dependencies @@ -804,7 +804,7 @@ jobs: uses: hpcflow/github-support/configure-git@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ inputs.python-version }} @@ -867,7 +867,7 @@ jobs: publish-state: ${{ steps.publish.outcome }} steps: - name: Set up python ${{ inputs.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index 84246c5..ac1246c 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -156,7 +156,7 @@ jobs: - name: Configure git for commits uses: hpcflow/github-support/configure-git@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 - name: Set up python - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.13" @@ -191,7 +191,7 @@ jobs: persist-credentials: false - name: Set up python - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.13" @@ -248,7 +248,7 @@ jobs: ref: ${{ inputs.ref }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} @@ -365,7 +365,7 @@ jobs: ref: ${{ inputs.ref }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} - name: Set up poetry @@ -483,7 +483,7 @@ jobs: ref: ${{ inputs.script-branch }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} - name: Set up poetry @@ -616,7 +616,7 @@ jobs: ref: ${{ inputs.script-branch }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} - name: Set up poetry @@ -749,7 +749,7 @@ jobs: ref: ${{ inputs.script-branch }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} - name: Set up poetry diff --git a/.github/workflows/test-pre-python-impl.yml b/.github/workflows/test-pre-python-impl.yml index b4e2707..7a52f30 100644 --- a/.github/workflows/test-pre-python-impl.yml +++ b/.github/workflows/test-pre-python-impl.yml @@ -51,7 +51,7 @@ jobs: ref: ${{ inputs.ref }} persist-credentials: false - name: Set up python ${{ matrix.python-version }} - uses: actions/setup-python@v7 + uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true From 5d7e20e829e7b4d2870332eaa45946748b63deb2 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 12:14:58 +0100 Subject: [PATCH 11/21] Move common pattern into custom action Get a minor complaint in one place only... --- .github/workflows/build-exes-impl.yml | 6 ++---- .github/workflows/release-impl.yml | 10 +++++++--- .github/workflows/test-impl.yml | 14 ++++++++------ run-in-docker/action.yml | 18 ++++++++++++++++++ 4 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 run-in-docker/action.yml diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index bb03317..f3624fe 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -563,9 +563,8 @@ jobs: - name: Build executable (file) within Docker id: linux_onefile if: inputs.build_onefile == 'true' - uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 + uses: $/run-in-docker with: - image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home -u $THE_USER @@ -632,9 +631,8 @@ jobs: - name: Build executable (folder) within Docker id: linux_onedir if: inputs.build_onedir == 'true' - uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 + uses: $/run-in-docker with: - image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home --env GH_TOKEN diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index a9d54ac..9f4db06 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -516,12 +516,16 @@ jobs: path: ${{ inputs.executable_name }}-app-data-cache - name: Build executables within Docker - uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 + uses: $/run-in-docker with: - image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home - --env GH_TOKEN --env BUILT_EXE_PATH_FILE --env EXE_NAME --env PYINST_DIR --env BUILT_EXE_BASE_NAME --env BUILT_EXE_PATH_DIR + --env GH_TOKEN + --env BUILT_EXE_PATH_FILE + --env EXE_NAME + --env PYINST_DIR + --env BUILT_EXE_BASE_NAME + --env BUILT_EXE_PATH_DIR --env EXPECTED run: | vers_expected="$EXPECTED" diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index ac1246c..0974e6b 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -321,12 +321,13 @@ jobs: path: ${{ inputs.executable_name }}-app-data-cache - name: Run unit tests within Docker - uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 + uses: $/run-in-docker with: - image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home - --env GH_TOKEN --env EXE_NAME --env UT_ARGS + --env GH_TOKEN + --env EXE_NAME + --env UT_ARGS run: | cd /home poetry config virtualenvs.in-project true @@ -437,12 +438,13 @@ jobs: path: ${{ inputs.executable_name }}-app-data-cache - name: Run integration tests within Docker - uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 + uses: $/run-in-docker with: - image: ghcr.io/hpcflow/rockylinux8-python:latest options: | -v ${{ github.workspace }}:/home - --env GH_TOKEN --env EXE_NAME --env IT_ARGS + --env GH_TOKEN + --env EXE_NAME + --env IT_ARGS run: | cd /home poetry config virtualenvs.in-project true diff --git a/run-in-docker/action.yml b/run-in-docker/action.yml new file mode 100644 index 0000000..3339980 --- /dev/null +++ b/run-in-docker/action.yml @@ -0,0 +1,18 @@ +name: Run code in Docker +description: > + Runs code in the context of a Rocky Linux 8 image. +inputs: + options: + description: Options to pass to docker + run: + description: The script to run in the container. + required: true +runs: + using: composite + steps: + - name: Run script within Docker + uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 + with: + image: ghcr.io/hpcflow/rockylinux8-python:latest + options: ${{ inputs.options }} + run: ${{ inputs.run }} From f42c57f2b05f694c4a3163b61d8083704a2d829b Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 12:18:52 +0100 Subject: [PATCH 12/21] Update scanner version --- .github/workflows/run-zizmor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-zizmor.yml b/.github/workflows/run-zizmor.yml index 050ed42..343e03f 100644 --- a/.github/workflows/run-zizmor.yml +++ b/.github/workflows/run-zizmor.yml @@ -21,4 +21,4 @@ jobs: persist-credentials: false - name: Run zizmor 🌈 - uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3 + uses: zizmorcore/zizmor-action@70fb788f84895a7701f5643d103d587e460b5c99 # v0.6.3 From b9c95b8108d6399026d46b91511643b2c106cf96 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 13:24:37 +0100 Subject: [PATCH 13/21] Rewrite action --- run-in-docker/action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/run-in-docker/action.yml b/run-in-docker/action.yml index 3339980..bf2cfbc 100644 --- a/run-in-docker/action.yml +++ b/run-in-docker/action.yml @@ -10,9 +10,9 @@ inputs: runs: using: composite steps: - - name: Run script within Docker - uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 - with: - image: ghcr.io/hpcflow/rockylinux8-python:latest - options: ${{ inputs.options }} - run: ${{ inputs.run }} + - shell: bash + run: | + exec docker run $DockerOptions --entrypoint sh ghcr.io/hpcflow/rockylinux8-python:latest -c "$DockerRun" + env: + DockerOptions: ${{ inputs.options }} + DockerRun: ${{ inputs.run }} From 10757c36a91a96c00e6e337fe89f2f6203181d05 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 13:27:45 +0100 Subject: [PATCH 14/21] Add README --- run-in-docker/README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 run-in-docker/README.md diff --git a/run-in-docker/README.md b/run-in-docker/README.md new file mode 100644 index 0000000..5d1c441 --- /dev/null +++ b/run-in-docker/README.md @@ -0,0 +1,4 @@ +# Run code in Docker +A stripped down version of [addnab/docker-run-action](https://github.com/addnab/docker-run-action) that binds a particular image. + +Definitely not intended to be usable by anyone else. From 1d5f9f77b8af1ab91fae8b5780cc25349d959028 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 13:35:41 +0100 Subject: [PATCH 15/21] Use local ref syntax --- .github/workflows/benchmark-impl.yml | 4 +- .github/workflows/build-exes-impl.yml | 14 ++--- .github/workflows/doc-build-impl.yml | 4 +- .github/workflows/release-impl.yml | 32 +++++------ .github/workflows/test-impl.yml | 62 +++++++++++----------- .github/workflows/test-pre-python-impl.yml | 4 +- 6 files changed, 60 insertions(+), 60 deletions(-) diff --git a/.github/workflows/benchmark-impl.yml b/.github/workflows/benchmark-impl.yml index 34e84af..8ac9129 100644 --- a/.github/workflows/benchmark-impl.yml +++ b/.github/workflows/benchmark-impl.yml @@ -67,11 +67,11 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: benchmark version: ${{ matrix.python-version }} diff --git a/.github/workflows/build-exes-impl.yml b/.github/workflows/build-exes-impl.yml index f3624fe..590998c 100644 --- a/.github/workflows/build-exes-impl.yml +++ b/.github/workflows/build-exes-impl.yml @@ -178,12 +178,12 @@ jobs: python-version: ${{ inputs.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: test version: ${{ inputs.python-version }} @@ -248,7 +248,7 @@ jobs: with: python-version: ${{ inputs.python-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: build-exe version: ${{ inputs.python-version }} @@ -260,7 +260,7 @@ jobs: path: ${{ inputs.executable_name }}-app-data-cache - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry with: version: ${{ inputs.poetry-version }} @@ -400,7 +400,7 @@ jobs: with: python-version: ${{ inputs.python-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: build-exe version: ${{ inputs.python-version }} @@ -412,7 +412,7 @@ jobs: path: ${{ inputs.executable_name }}-app-data-cache - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry with: version: ${{ inputs.poetry-version }} @@ -544,7 +544,7 @@ jobs: detached: true - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: build-exe version: ${{ inputs.python-version }} diff --git a/.github/workflows/doc-build-impl.yml b/.github/workflows/doc-build-impl.yml index 90789a1..504a283 100644 --- a/.github/workflows/doc-build-impl.yml +++ b/.github/workflows/doc-build-impl.yml @@ -101,11 +101,11 @@ jobs: with: python-version: ${{ inputs.python-version }} - name: Install and configure poetry ${{ inputs.poetry-version }} - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry with: version: ${{ inputs.poetry-version }} - name: Cache Virtual Environment - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: sphinx version: ${{ inputs.python-version }} diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index 9f4db06..5f5a232 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -178,7 +178,7 @@ jobs: persist-credentials: true allow-unsafe-pr-checkout: true - name: Configure git - uses: hpcflow/github-support/configure-git@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/configure-git - name: Set up python ${{ inputs.python-version }} uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: @@ -323,12 +323,12 @@ jobs: python-version: ${{ inputs.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: test version: ${{ inputs.python-version }} @@ -383,7 +383,7 @@ jobs: with: python-version: ${{ inputs.python-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: build version: ${{ inputs.python-version }} @@ -395,7 +395,7 @@ jobs: path: ${{ inputs.executable_name }}-app-data-cache - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry with: version: ${{ inputs.poetry-version }} @@ -441,14 +441,14 @@ jobs: TARGET: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir - name: Version check (file) - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: expected: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" command: | "$BUILT_EXE_PATH_FILE" --version - name: Version check (folder) - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: expected: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" command: | @@ -504,7 +504,7 @@ jobs: allow-unsafe-pr-checkout: true persist-credentials: false - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: build version: ${{ inputs.python-version }} @@ -621,11 +621,11 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: benchmark version: ${{ matrix.python-version }} @@ -719,12 +719,12 @@ jobs: with: python-version: ${{ inputs.python-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: release version: ${{ inputs.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry with: version: ${{ inputs.poetry-version }} @@ -805,7 +805,7 @@ jobs: allow-unsafe-pr-checkout: true - name: Configure git - uses: hpcflow/github-support/configure-git@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/configure-git - name: Set up python ${{ inputs.python-version }} uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 @@ -840,12 +840,12 @@ jobs: BASE_BRANCH: ${{ inputs.release_branch }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: release-doc version: ${{ inputs.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry with: version: ${{ inputs.poetry-version }} @@ -884,7 +884,7 @@ jobs: allow-unsafe-pr-checkout: true - name: Configure git - uses: hpcflow/github-support/configure-git@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/configure-git - name: Download documentation artifact uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index 0974e6b..9fcaa42 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -154,7 +154,7 @@ jobs: repository: ${{ inputs.full-repo-name }} persist-credentials: true - name: Configure git for commits - uses: hpcflow/github-support/configure-git@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/configure-git - name: Set up python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: @@ -196,13 +196,13 @@ jobs: python-version: "3.13" - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry timeout-minutes: ${{ inputs.install-poetry-timeout-minutes }} with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: test version: "3.13" @@ -259,12 +259,12 @@ jobs: path: ${{ inputs.executable_name }}-app-data-cache - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry timeout-minutes: ${{ inputs.install-poetry-timeout-minutes }} with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: test version: ${{ matrix.python-version }} @@ -309,7 +309,7 @@ jobs: ref: ${{ inputs.ref }} persist-credentials: false - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: test version: RockyLinux @@ -370,12 +370,12 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry timeout-minutes: ${{ inputs.install-poetry-timeout-minutes }} with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: test-integration version: ${{ matrix.python-version }} @@ -426,7 +426,7 @@ jobs: ref: ${{ inputs.ref }} persist-credentials: false - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: test-integration version: RockyLinux @@ -489,13 +489,13 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry id: poetry timeout-minutes: ${{ inputs.install-poetry-timeout-minutes }} with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: test-invocation version: ${{ matrix.python-version }} @@ -516,7 +516,7 @@ jobs: PY: ${{ steps.poetry.outputs.python-path }} - name: Test invocation command with `python ./${{ inputs.CLI_path }}` - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: source "$POETRY_PATH/bin/activate" command: python "./${CLI_PATH}" internal get-invoc-cmd @@ -526,7 +526,7 @@ jobs: CLI_PATH: ${{ inputs.CLI_path }} - name: Test invocation command with `python -m ${{ inputs.CLI_module }}` - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: source "$POETRY_PATH/bin/activate" command: python -m "$CLI_MODULE" internal get-invoc-cmd @@ -536,7 +536,7 @@ jobs: CLI_MODULE: ${{ inputs.CLI_module }} - name: Test invocation command with `${{ inputs.executable_name }}` entry point script - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: source "$POETRY_PATH/bin/activate" command: | @@ -547,7 +547,7 @@ jobs: EXE_NAME: ${{ inputs.executable_name }} - name: Test invocation command within a python script - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: source "$POETRY_PATH/bin/activate" command: python github-support/scripts/get_invoc_cmd.py "$APP_PKG" @@ -557,7 +557,7 @@ jobs: APP_PKG: ${{ inputs.app_package }} - name: Test invocation command with interactive python - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: source "$POETRY_PATH/bin/activate" command: python github-support/scripts/get_invoc_cmd_interactive.py python "$APP_PKG" @@ -567,7 +567,7 @@ jobs: APP_PKG: ${{ inputs.app_package }} - name: Test invocation command with interactive ipython - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: source "$POETRY_PATH/bin/activate" command: python github-support/scripts/get_invoc_cmd_interactive.py ipython "$APP_PKG" @@ -622,13 +622,13 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry id: poetry timeout-minutes: ${{ inputs.install-poetry-timeout-minutes }} with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: test-invocation version: ${{ matrix.python-version }} @@ -649,7 +649,7 @@ jobs: PY: ${{ steps.poetry.outputs.python-path }} - name: Test invocation command with `python ./${{ inputs.CLI_path }}` - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: source "$POETRY_PATH/bin/activate" command: python "./${CLI_PATH}" internal get-invoc-cmd @@ -659,7 +659,7 @@ jobs: CLI_PATH: ${{ inputs.CLI_path }} - name: Test invocation command with `python -m ${{ inputs.CLI_module }}` - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: source "$POETRY_PATH/bin/activate" command: python -m "$CLI_MODULE" internal get-invoc-cmd @@ -669,7 +669,7 @@ jobs: CLI_MODULE: ${{ inputs.CLI_module }} - name: Test invocation command with `${{ inputs.executable_name }}` entry point script - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: source "$POETRY_PATH/bin/activate" command: | @@ -680,7 +680,7 @@ jobs: EXE_NAME: ${{ inputs.executable_name }} - name: Test invocation command within a python script - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: source "$POETRY_PATH/bin/activate" command: python github-support/scripts/get_invoc_cmd.py "$APP_PKG" @@ -690,7 +690,7 @@ jobs: APP_PKG: ${{ inputs.app_package }} - name: Test invocation command with interactive python - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: source "$POETRY_PATH/bin/activate" command: python github-support/scripts/get_invoc_cmd_interactive.py python "$APP_PKG" @@ -700,7 +700,7 @@ jobs: APP_PKG: ${{ inputs.app_package }} - name: Test invocation command with interactive ipython - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: source "$POETRY_PATH/bin/activate" command: python github-support/scripts/get_invoc_cmd_interactive.py ipython "$APP_PKG" @@ -755,13 +755,13 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry id: poetry timeout-minutes: ${{ inputs.install-poetry-timeout-minutes }} with: version: ${{ inputs.poetry-version }} - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: test-invocation version: ${{ matrix.python-version }} @@ -784,7 +784,7 @@ jobs: PY: ${{ steps.poetry.outputs.python-path }} - name: Test invocation command with `python ./${{ inputs.CLI_path }}` - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: ."$Env:POETRY_PATH\Scripts\activate.ps1" command: python "./$Env:CLI_PATH" internal get-invoc-cmd @@ -794,7 +794,7 @@ jobs: CLI_PATH: ${{ inputs.CLI_path }} - name: Test invocation command with `python -m ${{ inputs.CLI_module }}` - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: ."$Env:POETRY_PATH\Scripts\activate.ps1" command: python -m "$Env:CLI_MODULE" internal get-invoc-cmd @@ -804,7 +804,7 @@ jobs: CLI_MODULE: ${{ inputs.CLI_module }} - name: Test invocation command with `${{ inputs.executable_name }}` entry point script - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: ."$Env:POETRY_PATH\Scripts\activate.ps1" command: | @@ -815,7 +815,7 @@ jobs: EXE_NAME: ${{ inputs.executable_name }} - name: Test invocation command within a python script - uses: hpcflow/github-support/compare@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/compare with: init: ."$Env:POETRY_PATH\Scripts\activate.ps1" command: python github-support\scripts\get_invoc_cmd.py "$Env:APP_PKG" diff --git a/.github/workflows/test-pre-python-impl.yml b/.github/workflows/test-pre-python-impl.yml index 7a52f30..ec1a8e1 100644 --- a/.github/workflows/test-pre-python-impl.yml +++ b/.github/workflows/test-pre-python-impl.yml @@ -56,12 +56,12 @@ jobs: python-version: ${{ matrix.python-version }} allow-prereleases: true - name: Cache dependencies - uses: hpcflow/github-support/init-cache@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/init-cache with: name: test version: ${{ matrix.python-version }} - name: Set up poetry - uses: hpcflow/github-support/setup-poetry@86e0cf45f9f79069d0bc1b8a727c097a03d9012e # 0.5 + uses: $/setup-poetry with: version: ${{ inputs.poetry-version }} From 0881793e5f70a92df7df7c6be5f2b085e8162fc1 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 13:46:52 +0100 Subject: [PATCH 16/21] Make checkout ourselves an action --- .github/workflows/doc-build-impl.yml | 7 +------ .github/workflows/test-impl.yml | 21 +++------------------ checkout-self/README.md | 2 ++ checkout-self/action.yml | 20 ++++++++++++++++++++ 4 files changed, 26 insertions(+), 24 deletions(-) create mode 100644 checkout-self/README.md create mode 100644 checkout-self/action.yml diff --git a/.github/workflows/doc-build-impl.yml b/.github/workflows/doc-build-impl.yml index 504a283..f823a3c 100644 --- a/.github/workflows/doc-build-impl.yml +++ b/.github/workflows/doc-build-impl.yml @@ -90,12 +90,7 @@ jobs: ref: ${{ inputs.ref }} persist-credentials: false - name: Checkout support code - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: hpcflow/github-support - path: github-support - ref: ${{ inputs.script-branch }} - persist-credentials: false + uses: $/checkout-self - name: Init Python ${{ inputs.python-version }} uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index 9fcaa42..f5e2a0e 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -478,12 +478,7 @@ jobs: ref: ${{ inputs.ref }} persist-credentials: false - name: Checkout supporting test infrastructure - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: hpcflow/github-support - path: github-support - ref: ${{ inputs.script-branch }} - persist-credentials: false + uses: $/checkout-self - name: Set up python ${{ matrix.python-version }} uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: @@ -611,12 +606,7 @@ jobs: ref: ${{ inputs.ref }} persist-credentials: false - name: Checkout supporting test infrastructure - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: hpcflow/github-support - path: github-support - ref: ${{ inputs.script-branch }} - persist-credentials: false + uses: $/checkout-self - name: Set up python ${{ matrix.python-version }} uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: @@ -744,12 +734,7 @@ jobs: ref: ${{ inputs.ref }} persist-credentials: false - name: Checkout supporting test infrastructure - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - repository: hpcflow/github-support - path: github-support - ref: ${{ inputs.script-branch }} - persist-credentials: false + uses: $/checkout-self - name: Set up python ${{ matrix.python-version }} uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: diff --git a/checkout-self/README.md b/checkout-self/README.md new file mode 100644 index 0000000..f24f033 --- /dev/null +++ b/checkout-self/README.md @@ -0,0 +1,2 @@ +# Check out this repository +Checks out this repository. Useful in some workflows, especially with self-references. diff --git a/checkout-self/action.yml b/checkout-self/action.yml new file mode 100644 index 0000000..36f86eb --- /dev/null +++ b/checkout-self/action.yml @@ -0,0 +1,20 @@ +name: Checkout this repository +description: > + Runs code in the context of a Rocky Linux 8 image. +inputs: + ref: + description: Reference to check out. + default: ${{ github.action_ref }} + path: + description: The path to check out as. + default: github-support +runs: + using: composite + steps: + - name: checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: hpcflow/github-support + path: ${{ inputs.path }} + ref: ${{ inputs.ref }} + persist-credentials: false From 907e391281e9ef2ebfeb4efd8c797caf325d007f Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 14:13:17 +0100 Subject: [PATCH 17/21] Need to use bash expansion semantics --- .github/workflows/release-impl.yml | 2 ++ .github/workflows/test-impl.yml | 4 ++++ .github/workflows/test-pre-python-impl.yml | 1 + 3 files changed, 7 insertions(+) diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index 5f5a232..095fb6f 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -411,6 +411,7 @@ jobs: poetry run "$EXE_NAME" data --list poetry run "$EXE_NAME" program install-cache "${EXE_NAME}-app-data-cache/programs" poetry run "$EXE_NAME" program --list + shell: bash - name: Build with pyinstaller (non-Windows, file) if: runner.os != 'Windows' @@ -642,6 +643,7 @@ jobs: EXE_NAME: ${{ inputs.executable_name }} PY_VER: ${{ matrix.python-version }} N_ELEM: ${{ matrix.num_elements }} + shell: bash - name: Store benchmark data uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index f5e2a0e..44f80b0 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -275,6 +275,7 @@ jobs: poetry install --without dev,pyinstaller - name: Install cached app data + shell: bash env: PYTHONUTF8: 1 EXE_NAME: ${{ inputs.executable_name }} @@ -285,6 +286,7 @@ jobs: poetry run "$EXE_NAME" program --list - name: Run tests + shell: bash timeout-minutes: ${{ inputs.unit-test-timeout-minutes }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -392,6 +394,7 @@ jobs: poetry install --without dev,pyinstaller - name: Install cached app data + shell: bash env: PYTHONUTF8: 1 EXE_NAME: ${{ inputs.executable_name }} @@ -402,6 +405,7 @@ jobs: poetry run "$EXE_NAME" program --list - name: Run integration tests + shell: bash timeout-minutes: ${{ inputs.integration-test-timeout-minutes }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test-pre-python-impl.yml b/.github/workflows/test-pre-python-impl.yml index ec1a8e1..d9f68ec 100644 --- a/.github/workflows/test-pre-python-impl.yml +++ b/.github/workflows/test-pre-python-impl.yml @@ -70,6 +70,7 @@ jobs: poetry install --without dev,pyinstaller - name: Run tests + shell: bash run: | poetry run python -m pytest $ARGUMENTS env: From dcb277a36429f2f2909fbbc5d30b74985f21ff47 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 14:28:58 +0100 Subject: [PATCH 18/21] Ghastly wreckage of quoting --- .github/workflows/test-impl.yml | 6 +++--- compare/action.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index 44f80b0..8bfca22 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -776,7 +776,7 @@ jobs: uses: $/compare with: init: ."$Env:POETRY_PATH\Scripts\activate.ps1" - command: python "./$Env:CLI_PATH" internal get-invoc-cmd + command: python ./$Env:CLI_PATH internal get-invoc-cmd expected: "('${{ steps.prep-test-data.outputs.python-path }}', '${{ steps.prep-test-data.outputs.cli-path }}')" env: POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} @@ -786,7 +786,7 @@ jobs: uses: $/compare with: init: ."$Env:POETRY_PATH\Scripts\activate.ps1" - command: python -m "$Env:CLI_MODULE" internal get-invoc-cmd + command: python -m $Env:CLI_MODULE internal get-invoc-cmd expected: "('${{ steps.prep-test-data.outputs.python-path }}', '${{ steps.prep-test-data.outputs.cli-path }}')" env: POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} @@ -807,7 +807,7 @@ jobs: uses: $/compare with: init: ."$Env:POETRY_PATH\Scripts\activate.ps1" - command: python github-support\scripts\get_invoc_cmd.py "$Env:APP_PKG" + command: python github-support\scripts\get_invoc_cmd.py $Env:APP_PKG expected: "('${{ steps.prep-test-data.outputs.python-path }}', '${{ steps.prep-test-data.outputs.cli-path }}')" env: POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} diff --git a/compare/action.yml b/compare/action.yml index 67ab813..d9bc037 100644 --- a/compare/action.yml +++ b/compare/action.yml @@ -20,7 +20,7 @@ runs: if: runner.os != 'Windows' run: | eval $INIT - actual=`$COMMAND` + actual=`eval $COMMAND` C='\033[0;33m' NC='\033[0m' echo -e "${C}actual:${NC} $actual" @@ -37,7 +37,7 @@ runs: Invoke-Expression $Env:INIT } $actual = (Invoke-Expression $Env:COMMAND) - $C = "$([char] 27)[0;33m" + $C = "$([char] 27)[0;33m" $NC = "$([char] 27)[0m" Write-Host "${C}actual:${NC} $actual" Write-Host "${C}expected:${NC} $Env:EXPECTED" From 5c5083c20ce788d51a37fae156ed7f0baafa0477 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 14:36:41 +0100 Subject: [PATCH 19/21] Missed a spot --- .github/workflows/test-impl.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-impl.yml b/.github/workflows/test-impl.yml index 8bfca22..e221620 100644 --- a/.github/workflows/test-impl.yml +++ b/.github/workflows/test-impl.yml @@ -796,8 +796,7 @@ jobs: uses: $/compare with: init: ."$Env:POETRY_PATH\Scripts\activate.ps1" - command: | - "$Env:EXE_NAME" internal get-invoc-cmd + command: $Env:EXE_NAME internal get-invoc-cmd expected: "('${{ steps.prep-test-data.outputs.python-path }}', '${{ steps.prep-test-data.outputs.exe-path }}')" env: POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} @@ -816,7 +815,7 @@ jobs: - name: Test direct workflow submission within a python script run: | ."$Env:POETRY_PATH\Scripts\activate.ps1" - python github-support\scripts\test_direct_sub_python_script.py "$Env:APP_PKG" + python github-support\scripts\test_direct_sub_python_script.py $Env:APP_PKG env: POETRY_PATH: ${{ steps.poetry.outputs.poetry-path }} APP_PKG: ${{ inputs.app_package }} From 479e1cc7eb22d7c6e3d658de541a8a49b56a0560 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 14:44:23 +0100 Subject: [PATCH 20/21] Awkward system --- compare/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compare/action.yml b/compare/action.yml index d9bc037..3d472de 100644 --- a/compare/action.yml +++ b/compare/action.yml @@ -36,7 +36,7 @@ runs: if ($Env:INIT) { Invoke-Expression $Env:INIT } - $actual = (Invoke-Expression $Env:COMMAND) + $actual = (Invoke-Expression "& $Env:COMMAND") $C = "$([char] 27)[0;33m" $NC = "$([char] 27)[0m" Write-Host "${C}actual:${NC} $actual" From 3a501affb6ac9e4510ca5d256822d2750ebf4539 Mon Sep 17 00:00:00 2001 From: "Donal K. Fellows" Date: Wed, 2 Sep 2026 14:52:02 +0100 Subject: [PATCH 21/21] Argh, another place to fix --- .github/workflows/release-impl.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/release-impl.yml b/.github/workflows/release-impl.yml index 095fb6f..0759018 100644 --- a/.github/workflows/release-impl.yml +++ b/.github/workflows/release-impl.yml @@ -442,6 +442,7 @@ jobs: TARGET: ${{ env.BUILT_EXE_BASE_NAME }}-${{ matrix.executable_os }}-dir - name: Version check (file) + if: runner.os != 'Windows' uses: $/compare with: expected: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" @@ -449,12 +450,29 @@ jobs: "$BUILT_EXE_PATH_FILE" --version - name: Version check (folder) + if: runner.os != 'Windows' uses: $/compare with: expected: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" command: | "$BUILT_EXE_PATH_DIR" --version + - name: Version check (file) + if: runner.os == 'Windows' + uses: $/compare + with: + expected: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" + command: | + "$Env:BUILT_EXE_PATH_FILE" --version + + - name: Version check (folder) + if: runner.os == 'Windows' + uses: $/compare + with: + expected: "${{ inputs.app_name }}, version ${{ needs.bump-version.outputs.version }}" + command: | + "$Env:BUILT_EXE_PATH_DIR" --version + - name: Run test suite on the frozen app (folder) env: GH_TOKEN: ${{ secrets.general-token }}