-
Notifications
You must be signed in to change notification settings - Fork 16
ci: add fast and full PR validation lanes #649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d170816
ci: add fast and full PR validation lanes
Shahroz16 c09cbd4
ci: tighten and streamline PR validation
Shahroz16 c33b4ed
ci: address adversarial reliability review
Shahroz16 26f5f43
ci: validate release-bearing PRs automatically
Shahroz16 46913eb
ci: auto-trigger full validation from commits
Shahroz16 88f4501
ci: classify release commits inside gated workflows
Shahroz16 a6c1c2c
ci: keep PR correctness coverage automatic
Shahroz16 e6da654
fix: preserve full CI runs across metadata events
Shahroz16 e323e89
ci: make metadata event classification explicit
Shahroz16 7f2f3f0
ci: align edited-event full-lane guards
Shahroz16 1e26031
ci: include sample changes in FCM verification
Shahroz16 8ffa41a
ci: preserve rename source paths in sample selector
Shahroz16 78264a4
ci: run scene E2E for affected paths
Shahroz16 90d1775
ci: keep full validation current
Shahroz16 d88be54
ci: add explicit unsigned sample verification
Shahroz16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| self-hosted-runner: | ||
| labels: | ||
| # GitHub-hosted public preview label announced in actions/runner-images#14404. | ||
| # Remove this override after actionlint recognizes the hosted label. | ||
| - xcode-27 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| : "${PR_TITLE:?PR_TITLE is required}" | ||
| : "${BASE_SHA:?BASE_SHA is required}" | ||
| : "${HEAD_SHA:?HEAD_SHA is required}" | ||
| is_release_message() { | ||
| local message="$1" | ||
| local header | ||
| header=$(sed -n '/[^[:space:]]/{p;q;}' <<< "$message") | ||
|
|
||
| case "$header" in | ||
| fix:*|fix\(*|feat:*|feat\(*|perf:*|perf\(*|revert:*|revert\(*|Revert\ \"*) | ||
| return 0 | ||
| ;; | ||
| esac | ||
|
|
||
| if grep -Eq '^[[:alpha:]]+(\([^)]*\))?!:' <<< "$header"; then | ||
| return 0 | ||
| fi | ||
|
|
||
| if grep -Eq '(^|[[:space:]])(BREAKING CHANGES?:|BREAKING-CHANGE:)' <<< "$message"; then | ||
| return 0 | ||
| fi | ||
|
|
||
| if grep -Eq '(^|[[:space:]])This reverts commit[[:space:]]' <<< "$message"; then | ||
| return 0 | ||
| fi | ||
|
|
||
| return 1 | ||
| } | ||
|
|
||
| pr_release=false | ||
| commit_release=false | ||
|
|
||
| if is_release_message "$PR_TITLE"; then | ||
| pr_release=true | ||
| fi | ||
|
|
||
| git cat-file -e "$BASE_SHA^{commit}" | ||
| git cat-file -e "$HEAD_SHA^{commit}" | ||
| commit_messages_file=$(mktemp) | ||
| trap 'rm -f "$commit_messages_file"' EXIT | ||
| git log --format='%B%x00' "$BASE_SHA..$HEAD_SHA" > "$commit_messages_file" | ||
|
|
||
| while IFS= read -r -d '' commit_message; do | ||
| if is_release_message "$commit_message"; then | ||
| commit_release=true | ||
| break | ||
| fi | ||
| done < "$commit_messages_file" | ||
|
|
||
| full_validation=false | ||
|
|
||
| if [[ "$pr_release" == 'true' || "$commit_release" == 'true' || "${CI_FULL:-false}" == 'true' ]]; then | ||
| full_validation=true | ||
| fi | ||
|
|
||
| if [[ -n "${GITHUB_OUTPUT:-}" ]]; then | ||
| { | ||
| echo "pr_release=$pr_release" | ||
| echo "commit_release=$commit_release" | ||
| echo "full_validation=$full_validation" | ||
| } >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| echo "Distribution policy classified (pr_release=$pr_release, commit_release=$commit_release, full_validation=$full_validation)." | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.