ci: enable doc testing for new patchwork patches
PATCH v2 1/1 ci: enable doc testing for new patchwork patches
From: Andrea Cervesato <[email protected]>
Run documentation build in the ci-patchwork-trigger GitHub workflow when new patchwork patches arrive in the ML.
Signed-off-by Andrea Cervesato <[email protected]>
---
Changes in v2:
- run multiple workflows by taking an array for workflows to run
- Link to v1: https://lore.kernel.org/r/[email protected]
--- .github/workflows/ci-patchwork-trigger.yml | 29 +++++++++++++++---------- .github/workflows/ci-sphinx-doc.yml | 35 ++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 11 deletions(-)
.github/workflows/ci-patchwork-trigger.yml +18 -11
@@ -43,6 +43,11 @@ jobs: return; } + const workflows = [ + 'ci-docker-build.yml', + 'ci-sphinx-doc.yml' + ]; + for (const data of lines) { const [series_id, series_mbox] = data.split('|'); if (series_id.length === 0 || series_mbox.length === 0) {
@@ -50,16 +55,18 @@ jobs: continue; } - const response = await github.rest.actions.createWorkflowDispatch({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: context.ref, - workflow_id: 'ci-docker-build.yml', - inputs: { - SERIES_ID: series_id, - SERIES_MBOX: series_mbox, - } - }); + for (const workflow in workflows) { + const response = await github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: context.ref, + workflow_id: workflow, + inputs: { + SERIES_ID: series_id, + SERIES_MBOX: series_mbox, + } + }); - console.log(response); + console.log(response); + } }
.github/workflows/ci-sphinx-doc.yml +35 -0
@@ -8,6 +8,16 @@ on: paths: ['doc/**'] pull_request: paths: ['doc/**'] + workflow_dispatch: + inputs: + SERIES_ID: + description: LTP patch series ID + required: false + default: '' + SERIES_MBOX: + description: LTP patch series URL + required: false + default: '' permissions: {}
@@ -25,6 +35,20 @@ jobs: sudo apt update sudo apt install autoconf make python3-virtualenv + - name: Apply Patchwork series + if: inputs.SERIES_ID != '' && inputs.SERIES_MBOX != '' + env: + PATCHWORK_TOKEN: ${{ secrets.PATCHWORK_TOKEN }} + run: | + git config --global user.name 'GitHub CI' + git config --global user.email '[email protected]' + git config --global --add safe.directory "$GITHUB_WORKSPACE" + + git checkout -b review_patch_series_"${{ inputs.SERIES_ID }}" + curl -k "${{ inputs.SERIES_MBOX }}" | git am + + ./ci/tools/patchwork.sh state "${{ inputs.SERIES_ID }}" "needs-review-ack" + - name: Run configure run: | cd "$GITHUB_WORKSPACE/ltp/"
@@ -42,3 +66,14 @@ jobs: cd "$GITHUB_WORKSPACE/ltp/doc/" . .venv/bin/activate make + + - name: Send results to Patchwork + if: always() && inputs.SERIES_ID != '' && inputs.SERIES_MBOX != '' + env: + PATCHWORK_TOKEN: ${{ secrets.PATCHWORK_TOKEN }} + run: | + ./ci/tools/patchwork.sh check \ + "${{ inputs.SERIES_ID }}" \ + "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ + "${{ matrix.container }}" \ + "${{ job.status }}"
---
base-commit: 037cb53e353abb571e52b52cbaa6b569ac28c50c
change-id: 20250425-ci_enable_sphinx_doc-3897893080ee
Best regards,
Signature · 5 lines
Andrea Cervesato <[email protected]> -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
Looks good to me:
Acked-by Cyril Hrubis <[email protected]>
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp