Skip to content

Commit 7412850

Browse files
committed
Localization: run the AI translation tooling unit tests in CI
The pure-Ruby unit suites (TranslationValidator, Glossary, AnthropicBatch, AITranslator) weren't executed by any pipeline step — the "Unit Tests" jobs are the Xcode/XCTest suites, and rubocop (via Danger) only lints them. Add a lightweight Buildkite step that runs each fastlane/lanes/*_test.rb with plain ruby (stdlib minitest — no Xcode, no app build, no bundle). Runs unconditionally rather than behind should-skip-job.sh --job-type validation, which skips on tooling-only changes — i.e. exactly the PRs that touch these files.
1 parent 3c67f05 commit 7412850

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash -eu
2+
3+
# Runs the localization tooling's pure-Ruby unit suites (stdlib minitest — no Xcode, no app build, no bundle).
4+
# Intentionally always runs (no should-skip-job guard): these guard the fastlane localization helpers, and the
5+
# `validation` skip rule skips on tooling-only changes — exactly when these tests matter most.
6+
7+
echo "--- :test_tube: Localization tooling unit tests"
8+
9+
shopt -s nullglob
10+
tests=(fastlane/lanes/*_test.rb)
11+
if [[ ${#tests[@]} -eq 0 ]]; then
12+
echo "No *_test.rb files found under fastlane/lanes/."
13+
exit 0
14+
fi
15+
16+
status=0
17+
for test in "${tests[@]}"; do
18+
echo "+++ :ruby: ${test}"
19+
ruby "${test}" || status=1
20+
done
21+
22+
exit "${status}"

.buildkite/pipeline.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@ steps:
163163
- github_commit_status:
164164
context: "Verify String Catalog Coverage"
165165

166+
- label: ":test_tube: Localization Tooling Unit Tests"
167+
command: .buildkite/commands/test-localization-tooling.sh
168+
plugins: [$CI_TOOLKIT_PLUGIN]
169+
notify:
170+
- github_commit_status:
171+
context: "Localization Tooling Unit Tests"
172+
166173
#################
167174
# Claude Build Analysis - dynamically uploaded so Build result conditions evaluate at runtime after the wait
168175
#################

0 commit comments

Comments
 (0)