Skip to content

Commit f05a198

Browse files
committed
Integrate within the release flow
1 parent 8ccd943 commit f05a198

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

lib/fastlane/plugin/ddg_apple_automation/helper/ddg_apple_automation_helper.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,19 @@ def self.create_release_branch(platform, version)
227227
end
228228

229229
def self.update_embedded_files(platform, other_action)
230+
tds_perf_test_result = other_action.tds_perf_test(
231+
ut_file_name: "your_ut_file_name.json",
232+
ut_url: "https://example.com/your_ut_file.json",
233+
ref_file_name: "your_ref_file_name.json",
234+
ref_url: "https://example.com/your_ref_file.json"
235+
)
236+
237+
unless tds_perf_test_result
238+
UI.important("TDS performance tests failed. Proceeding with caution.")
239+
# Optionally, you could abort here if you want to make passing tests mandatory
240+
# UI.abort_with_message!("TDS performance tests failed. Aborting embedded file update.")
241+
end
242+
230243
Actions.sh("./scripts/update_embedded.sh")
231244

232245
# Verify no unexpected files were modified

spec/ddg_apple_automation_helper_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ def load_file(file)
410410
allow(Fastlane::Actions).to receive(:sh).with("git", "status").and_return(git_status_output)
411411
allow(Fastlane::Actions).to receive(:sh).with("git", "add", "Core/trackerData.json").and_return("")
412412
allow(Fastlane::Actions).to receive(:sh).with("git", "commit", "-m", "Update embedded files").and_return("")
413+
allow(other_action).to receive(:tds_perf_test).and_return(true)
413414
expect(other_action).to receive(:ensure_git_status_clean)
414415
described_class.update_embedded_files(platform, other_action)
415416
expect(Fastlane::Actions).to have_received(:sh).with("git", "status")

0 commit comments

Comments
 (0)