diff --git a/.github/workflows/self-test.yml b/.github/workflows/self-test.yml index c770088..e2b1f54 100644 --- a/.github/workflows/self-test.yml +++ b/.github/workflows/self-test.yml @@ -15,6 +15,13 @@ on: - 'requirements.txt' - 'docs/examples/demo/**' - '.github/workflows/self-test.yml' + pull_request_target: + branches: main + paths: + - 'action.yml' + - 'requirements.txt' + - 'docs/examples/demo/**' + - '.github/workflows/self-test.yml' jobs: test: diff --git a/action.yml b/action.yml index cdd9c15..03dfff3 100644 --- a/action.yml +++ b/action.yml @@ -191,6 +191,13 @@ inputs: > The [`no-lgtm`](#no-lgtm) option is applicable to Pull Request reviews. required: false default: false + jobs: + description: | + The number of jobs to run in parallel. + If less than or equal to 0, the number of jobs is set to + use the number of all available CPU cores. + required: false + default: 0 outputs: checks-failed: description: An integer that can be used as a boolean value to indicate if any checks failed by clang-tidy and clang-format. @@ -260,7 +267,8 @@ runs: --file-annotations=${{ inputs.file-annotations }} \ --extra-arg="${{ inputs.extra-args }}" \ --tidy-review="${{ inputs.tidy-review }}" \ - --format-review="${{ inputs.format-review }}" + --format-review="${{ inputs.format-review }}" \ + --jobs=${{ inputs.jobs }} - name: Setup python venv (Windows) if: runner.os == 'Windows' @@ -295,6 +303,7 @@ runs: ' --file-annotations=${{ inputs.file-annotations }}' + ' --extra-arg="${{ inputs.extra-args }}"' + ' --tidy-review="${{ inputs.tidy-review }}"' + - ' --format-review="${{ inputs.format-review }}"' + ' --format-review="${{ inputs.format-review }}"' + + ' --jobs=${{ inputs.jobs }}' Invoke-Expression -Command $app diff --git a/docs/action.yml b/docs/action.yml index b5a5f23..40b65cd 100644 --- a/docs/action.yml +++ b/docs/action.yml @@ -40,6 +40,8 @@ inputs: format-review: minimum-version: '2.9.0' required-permission: 'pull-requests: write #pull-request-reviews' + jobs: + minimum-version: '2.11.0' outputs: checks-failed: minimum-version: '1.2.0'