Skip to content

Commit f02a287

Browse files
Fix TestOps API request failure (#499)
1 parent 33a3c2d commit f02a287

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ GEM
200200
fastlane
201201
pry
202202
fastlane-plugin-sonarcloud_metric_kit (0.2.1)
203-
fastlane-plugin-stream_actions (0.3.35)
203+
fastlane-plugin-stream_actions (0.3.36)
204204
xctest_list (= 1.2.1)
205205
fastlane-plugin-versioning (0.5.2)
206206
ffi (1.16.3)
@@ -430,7 +430,7 @@ DEPENDENCIES
430430
fastlane-plugin-create_xcframework
431431
fastlane-plugin-lizard
432432
fastlane-plugin-sonarcloud_metric_kit
433-
fastlane-plugin-stream_actions (= 0.3.35)
433+
fastlane-plugin-stream_actions (= 0.3.36)
434434
fastlane-plugin-versioning
435435
jazzy
436436
json

fastlane/Allurefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env ruby
22

33
allure_project_id = '2'
4-
allure_url = 'https://streamio.testops.cloud'
4+
allure_url = 'https://streamio.testops.cloud/api'
55
allure_regression_testplan = 'Regression Testing'
66
allure_results_path = 'allure-results'
77

@@ -25,12 +25,12 @@ lane :allure_launch do |options|
2525
github_run_details: github_run_details,
2626
cron: options[:cron]
2727
)
28-
sh("echo 'LAUNCH_ID=#{launch_id}' >> $GITHUB_ENV")
28+
sh("echo 'LAUNCH_ID=#{launch_id}' >> $GITHUB_ENV") if is_ci
2929
end
3030

3131
desc 'Remove launch on Allure TestOps'
3232
lane :allure_launch_removal do |options|
33-
allure_api(path: "/launch/#{options[:launch_id]}", http_method: 'DELETE')
33+
allure_api(path: "launch/#{options[:launch_id]}", http_method: 'DELETE')
3434
end
3535

3636
desc 'Create test-case in Allure TestOps and get its id'
@@ -50,6 +50,8 @@ lane :allure_start_regression do |options|
5050
end
5151

5252
def github_run_details
53+
return nil unless is_ci
54+
5355
github_path = "#{ENV.fetch('GITHUB_API_URL', nil)}/repos/#{ENV.fetch('GITHUB_REPOSITORY', nil)}/actions/runs/#{ENV.fetch('GITHUB_RUN_ID', nil)}"
5456
output = sh(command: "curl -s -H 'authorization: Bearer #{ENV.fetch('GITHUB_TOKEN', nil)}' -X GET -G #{github_path}", log: false)
5557
JSON.parse(output)

fastlane/Pluginfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
gem 'fastlane-plugin-versioning'
66
gem 'fastlane-plugin-sonarcloud_metric_kit'
7-
gem 'fastlane-plugin-stream_actions', '0.3.35'
7+
gem 'fastlane-plugin-stream_actions', '0.3.36'
88
gem 'fastlane-plugin-create_xcframework'

0 commit comments

Comments
 (0)