Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enable parallelism #213

Merged
merged 3 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/self-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 11 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
2 changes: 2 additions & 0 deletions docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Loading