diff --git a/.github/workflows/android-browserstack.yml b/.github/workflows/android-browserstack.yml index 3e14b63..b6759d4 100644 --- a/.github/workflows/android-browserstack.yml +++ b/.github/workflows/android-browserstack.yml @@ -43,7 +43,7 @@ jobs: run: ./copy_test_resources.sh - name: Inject AccessKey - run: echo pvTestingAccessKey="123abc" >> local.properties + run: echo pvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" >> local.properties - name: Inject Android keystore variables run: | @@ -95,7 +95,7 @@ jobs: run: ./copy_test_resources.sh - name: Inject AccessKey - run: echo pvTestingAccessKey="123abc" >> local.properties + run: echo pvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" >> local.properties - name: Inject Android keystore variables run: | diff --git a/.github/workflows/android-perf.yml b/.github/workflows/android-perf.yml index 4575bb2..5f7a44a 100644 --- a/.github/workflows/android-perf.yml +++ b/.github/workflows/android-perf.yml @@ -27,7 +27,7 @@ jobs: device: [ android-perf ] include: - device: android-perf - performanceThresholdSec: 0 # 0.005 + performanceThresholdSec: 0.005 steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/ios-browserstack.yml b/.github/workflows/ios-browserstack.yml index f2b5e55..4b79ef8 100644 --- a/.github/workflows/ios-browserstack.yml +++ b/.github/workflows/ios-browserstack.yml @@ -37,7 +37,7 @@ jobs: run: mkdir ddp - name: Inject AccessKey - run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:123abc:' + run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:' CobraAppTestUITests/CobraAppTestUITests.swift - name: XCode Build diff --git a/.github/workflows/ios-perf.yml b/.github/workflows/ios-perf.yml index a5628a5..9eb52e9 100644 --- a/.github/workflows/ios-perf.yml +++ b/.github/workflows/ios-perf.yml @@ -27,7 +27,7 @@ jobs: device: [ ios-perf ] include: - device: ios-perf - performanceThresholdSec: 0 # 0.001 + performanceThresholdSec: 0.001 steps: - name: Checkout diff --git a/script/automation/browserstack.py b/script/automation/browserstack.py index 933d253..428a63f 100644 --- a/script/automation/browserstack.py +++ b/script/automation/browserstack.py @@ -66,28 +66,17 @@ def main(args: argparse.Namespace) -> None: 'devices': devices_dict[args.devices] } - while True: - build_response = requests.post( - BUILD_URI.format(args.type), - headers=build_headers, - json=build_data, - auth=(args.username, args.access_key) - ) - if (build_response is not None and 'message' in build_response.json() and '[BROWSERSTACK_ALL_PARALLELS_IN_USE]' - in build_response.json()['message']): - print('Parallel threads limit reached. Waiting...', flush=True) - time.sleep(60) - else: - break - - if build_response is None: - print('Build Failed') - exit(1) + build_response = requests.post( + BUILD_URI.format(args.type), + headers=build_headers, + json=build_data, + auth=(args.username, args.access_key) + ) build_response_json = build_response.json() - if not build_response.ok: - print('Build Failed', build_response.json()) + if not build_response.ok and ('message' in build_response_json and '[BROWSERSTACK_ALL_PARALLELS_IN_USE]' not in build_response_json['message']): + print('Build Failed', build_response_json) exit(1) if build_response_json['message'] != 'Success':