-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix false positive Keystone and WordPressData tests in CI #24630
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 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b498ddf
Add `pipefail` to inline commands to run tests in CI
mokagio 82139e8
Run Keystone and WordPressData unit tests in CI on iOS 18.4
mokagio f413a08
DRY command to run unit tests focused to a scheme in CI
mokagio 6c2b7a6
Disable Keystone tests in CI
mokagio 62c6317
Add schema to Buildkite pipeline and address `if: false` violation
mokagio 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,17 @@ | ||
#!/bin/bash -euo pipefail | ||
|
||
SCHEME="${1:?Usage $0 SCHEME}" | ||
DEVICE="iPhone 16" | ||
OS_VERSION="18.4" | ||
|
||
if "$(dirname "${BASH_SOURCE[0]}")/should-skip-job.sh" --job-type validation; then | ||
exit 0 | ||
fi | ||
|
||
$(dirname "${BASH_SOURCE[0]}")/shared-set-up.sh | ||
|
||
xcodebuild \ | ||
-scheme "${SCHEME}" \ | ||
-destination "platform=iOS Simulator,OS=${OS_VERSION},name=${DEVICE}" \ | ||
test \ | ||
| xcbeautify |
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 |
---|---|---|
|
@@ -111,35 +111,17 @@ steps: | |
- github_commit_status: | ||
context: "Reader Unit Tests" | ||
- label: "🔬 Keystone Unit Tests" | ||
command: | | ||
if .buildkite/commands/should-skip-job.sh --job-type validation; then | ||
exit 0 | ||
fi | ||
|
||
.buildkite/commands/shared-set-up.sh | ||
xcodebuild \ | ||
-scheme Keystone \ | ||
-destination 'platform=iOS Simulator,OS=18.2,name=iPhone 16' \ | ||
test \ | ||
| xcbeautify | ||
command: .buildkite/commands/run-unit-tests-for-scheme.sh Keystone | ||
# Disabled till https://github.com/wordpress-mobile/WordPress-iOS/pull/24537 is completed | ||
if: false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
plugins: [$CI_TOOLKIT_PLUGIN] | ||
artifact_paths: | ||
- "build/results/*" | ||
notify: | ||
- github_commit_status: | ||
context: "Unit Tests Keystone" | ||
- label: "🔬 WordPressData Unit Tests" | ||
command: | | ||
if .buildkite/commands/should-skip-job.sh --job-type validation; then | ||
exit 0 | ||
fi | ||
|
||
.buildkite/commands/shared-set-up.sh | ||
xcodebuild \ | ||
-scheme WordPressData \ | ||
-destination 'platform=iOS Simulator,OS=18.2,name=iPhone 16' \ | ||
test \ | ||
| xcbeautify | ||
command: .buildkite/commands/run-unit-tests-for-scheme.sh WordPressData | ||
plugins: [$CI_TOOLKIT_PLUGIN] | ||
artifact_paths: | ||
- "build/results/*" | ||
|
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth extracting that on its dedicated
set -euo pipefail
line just to be sure.This is because I think that if the
command
in the pipeline is a single string to a script with no parameter—and not a multiline string invoking multiple commands or a string invoking a command with parameters—then Buildkite mightsource
that script (which makes the shebang ignored) instead of calling it as a command.This is not the case currently because while the
command:
is now single line, it still passes a parameter to the script, so Buildkite with still call it not source it.But in case in the future we end up not needing that parameter anymore and remove it and this ends up having the obscure side-effect of having the script sourced … better safe than sorry?