build: make special label checks auto-pass instead of skip
In this commit, we revamp the way our skip-labels worked to instead mark certain stages as green, instead of skipping them. Skipped changes didn't count towards the set of required checks, which slowed down PR velocity. Previously, when PRs were labeled with 'no-itest' or 'no-changelog', the corresponding CI jobs would be completely skipped. This caused the GitHub checks to show as skipped rather than successful, which could be confusing and prevented certain merge rules from working properly. This commit changes the behavior so that these jobs still run but immediately report success when the special labels are detected. Each affected job now starts with a label check step that sets a skip flag, and all subsequent steps are conditionally executed based on this flag. When skipped, the jobs add a notice to the GitHub step summary explaining that tests were auto-passed due to the label. The change affects five jobs: basic-integration-test, integration-test, windows-integration-test, macos-integration-test, and milestone-check.
This commit is contained in:
2 files changed
+96
-22
No files matched your search
@@ -0,0 +1,30 @@
|
||||
name: "Check PR labels"
|
||||
description: "Checks if specific labels are present on a PR and sets outputs accordingly."
|
||||
|
||||
inputs:
|
||||
label:
|
||||
description: "The label to check for"
|
||||
required: true
|
||||
skip-message:
|
||||
description: "The message to display when skipping due to label"
|
||||
required: true
|
||||
|
||||
outputs:
|
||||
skip:
|
||||
description: "Whether to skip the tests (true/false)"
|
||||
value: ${{ steps.check.outputs.skip }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Check for label
|
||||
id: check
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ contains(github.event.pull_request.labels.*.name, inputs.label) }}" == "true" ]]; then
|
||||
echo "::notice::${{ inputs.skip-message }}"
|
||||
echo "${{ inputs.skip-message }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "skip=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "skip=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
Reference in new issue
Block a user