Skip to content

[Tooling] Skip UI Tests if there are no relevant changes #15086

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 6 commits into from
Feb 26, 2025
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 .buildkite/commands/run-ui-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/bash -eu

if .buildkite/commands/should-skip-tests.sh; then
message="Skipping UI Tests as only documentation, tooling and/or non-code files were changed"
echo "$message" | buildkite-agent annotate --style "info" --context "skip-ui-tests"
echo "$message"
exit 0
fi

TEST_NAME=$1
DEVICE=$2

Expand Down
7 changes: 7 additions & 0 deletions .buildkite/commands/run-unit-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/bash -eu

if .buildkite/commands/should-skip-tests.sh; then
message="Skipping Unit Tests as only documentation, tooling and/or non-code files were changed"
echo "$message" | buildkite-agent annotate --style "info" --context "skip-unit-tests"
echo "$message"
exit 0
fi

# Run this at the start to fail early if value not available
echo '--- :test-analytics: Configuring Test Analytics'
export BUILDKITE_ANALYTICS_TOKEN=$BUILDKITE_ANALYTICS_TOKEN_UNIT_TESTS
Expand Down
4 changes: 4 additions & 0 deletions .buildkite/commands/should-skip-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

# Check if changes are limited to documentation, tooling and non-code files
pr_changed_files --all-match "*.md" "docs/**" "*.txt" "*.pot" "fastlane/**" ".github/**" ".buildkite/**"
2 changes: 1 addition & 1 deletion .buildkite/shared-pipeline-vars
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# to set up some variables that will be interpolated in the `.yml` pipeline before uploading it.

XCODE_VERSION=$(sed 's/^~> *//' .xcode-version)
CI_TOOLKIT_PLUGIN_VERSION="3.9.1"
CI_TOOLKIT_PLUGIN_VERSION="4.0.0"

# Note: `-v4` suffix was added to use xcode-16.1-v4 image; remember to remove that suffix during the next Xcode update
export IMAGE_ID="xcode-$XCODE_VERSION-v4"
Expand Down