[LTP] [PATCH] ci: enable doc testing for new patchwork patches
Andrea Cervesato
andrea.cervesato@suse.com
Fri Apr 25 15:19:20 CEST 2025
Hi, please consider the v2.
- Andrea
On 4/25/25 14:58, Andrea Cervesato wrote:
> From: Andrea Cervesato <andrea.cervesato@suse.com>
>
> Run documentation build in the ci-patchwork-trigger GitHub
> workflow when new patchwork patches arrive in the ML.
>
> Signed-off-by: Andrea Cervesato <andrea.cervesato@suse.com>
> ---
> .github/workflows/ci-patchwork-trigger.yml | 13 +++++++++++
> .github/workflows/ci-sphinx-doc.yml | 35 ++++++++++++++++++++++++++++++
> 2 files changed, 48 insertions(+)
>
> diff --git a/.github/workflows/ci-patchwork-trigger.yml b/.github/workflows/ci-patchwork-trigger.yml
> index 0938aed5ad0df8af8e2e575283b56475ff219ff3..96f70d086cacbe0c519c846e80b69e8570dc31ec 100644
> --- a/.github/workflows/ci-patchwork-trigger.yml
> +++ b/.github/workflows/ci-patchwork-trigger.yml
> @@ -62,4 +62,17 @@ jobs:
> });
>
> console.log(response);
> +
> + const response = await github.rest.actions.createWorkflowDispatch({
> + owner: context.repo.owner,
> + repo: context.repo.repo,
> + ref: context.ref,
> + workflow_id: 'ci-sphinx-doc.yml',
> + inputs: {
> + SERIES_ID: series_id,
> + SERIES_MBOX: series_mbox,
> + }
> + });
> +
> + console.log(response);
> }
> diff --git a/.github/workflows/ci-sphinx-doc.yml b/.github/workflows/ci-sphinx-doc.yml
> index e77c766871b98114417dc7d8d1cb108afe885735..61a593d0aad50ed622a92bfa17681e19a6e2608e 100644
> --- a/.github/workflows/ci-sphinx-doc.yml
> +++ b/.github/workflows/ci-sphinx-doc.yml
> @@ -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 'github@example.com'
> + 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,
More information about the ltp
mailing list