From 90cdc8c76a402d9a9d1370d393bb621a3b00e902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 17 Sep 2024 15:07:35 +0200 Subject: [PATCH 01/45] Update bitrise.yml --- bitrise.yml | 153 ++++++++++++++++++++++++++++------------------------ 1 file changed, 82 insertions(+), 71 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index d7ccafac5..d26958d46 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -1,33 +1,80 @@ -format_version: "11" +--- +format_version: "17" default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git project_type: other +trigger_map: +- push_branch: master + pipeline: ci +- pull_request_source_branch: "*" + pipeline: ci + +pipelines: + ci: + stages: + - run_tests: { } + +stages: + run_tests: + workflows: + - lint: { } + - unit_test: { } + - integration_test: { } + - test_binary_build: { } + app: envs: - - BIN_NAME: bitrise + - SRC_DIR_IN_GOPATH: $GOPATH/src/github.com/bitrise-io/bitrise workflows: - check: + lint: steps: + - script@1: + title: Setup YAML lint + inputs: + - script_file_path: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -ex + apt-get update + apt-get --assume-yes install python3.8-venv + - change-workdir: + inputs: + - path: ${SRC_DIR_IN_GOPATH} + - git-clone: + inputs: + - fetch_tags: "yes" - git::https://github.com/bitrise-steplib/steps-check.git: inputs: - workflow: lint - skip_step_yml_validation: "yes" + - deploy-to-bitrise-io: { } + + unit_test: + steps: + - change-workdir: + inputs: + - path: ${SRC_DIR_IN_GOPATH} + - git-clone: + inputs: + - fetch_tags: "yes" - go-list: { } - script: title: Go test inputs: - content: go test -p 1 $BITRISE_GO_PACKAGES + - deploy-to-bitrise-io: { } - test: - title: Runs tests - after_run: - - check - - integration-test - - integration-test: + integration_test: title: Runs integration tests steps: + - change-workdir: + inputs: + - path: ${SRC_DIR_IN_GOPATH} + - git-clone: + inputs: + - fetch_tags: "yes" - script: title: Run integration tests inputs: @@ -49,37 +96,31 @@ workflows: if [ "$(uname)" == "Linux" ]; then go test -v ./_tests/integration/ --tags linux_only fi + - deploy-to-bitrise-io: { } - create-release: - description: Creates Linux and Darwin binaries, then publishes a GitHub release - envs: - - GITHUB_TOKEN: $GIT_BOT_USER_ACCESS_TOKEN # Goreleaser expects this env var + test_binary_build: + description: Tests the release build process by creating a snapshot release (without publishing) steps: - - script: - title: Fetch GCS bucket credentials + - script@1: + title: Set up Goreleaser inputs: - content: |- - #!/bin/bash - set -ex - - echo "$GCS_BITRISE_CLI_BUCKET_CREDENTIALS" > /tmp/gcs_service_account.json - # Goreleaser expects this env var: - envman add --key GOOGLE_APPLICATION_CREDENTIALS --value /tmp/gcs_service_account.json - - script: - title: Goreleaser (create binaries + publish to GH) - deps: - brew: - - name: goreleaser - inputs: - - content: | #!/usr/bin/env bash - set -ex - - goreleaser release - - test-binary-build: - description: Tests the release build process by creating a snapshot release (without publishing) - steps: + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + wget -O /tmp/goreleaser.deb https://github.com/goreleaser/goreleaser/releases/download/v1.19.2/goreleaser_1.19.2_amd64.deb + sudo dpkg -i /tmp/goreleaser.deb + - change-workdir: + inputs: + - path: ${SRC_DIR_IN_GOPATH} + - git-clone: + inputs: + - fetch_tags: "yes" - script: title: Goreleaser (create snapshot binaries) deps: @@ -91,39 +132,9 @@ workflows: set -ex goreleaser release --snapshot --rm-dist + - deploy-to-bitrise-io: { } - noop: - title: Noop - description: Empty workflow for quick testing - - fail-test: - title: Fails - description: Workflow will fail - steps: - - script: - title: Success - inputs: - - content: |- - set -ex - exit 0 - - script: - title: Fail wit exit code 2 - inputs: - - content: |- - set -ex - exit 2 - - script: - title: Skippable fail with exit code 2 - is_always_run: true - is_skippable: true - inputs: - - content: |- - set -ex - exit 2 - - script: - title: Skipping success - is_always_run: false - inputs: - - content: |- - set -ex - exit 0 +meta: + bitrise.io: + machine_type_id: elite-xl + stack: linux-docker-android-20.04 From 73eb9f6fbc1dd1eb8a831184b6c6f4729ebf3edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 17 Sep 2024 15:26:24 +0200 Subject: [PATCH 02/45] Test on macos and linux and add release workflow --- bitrise.yml | 117 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 86 insertions(+), 31 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index d26958d46..7197a3530 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -8,6 +8,9 @@ trigger_map: pipeline: ci - pull_request_source_branch: "*" pipeline: ci +- tag: "*.*.*" + workflow: release + enabled: false pipelines: ci: @@ -17,17 +20,83 @@ pipelines: stages: run_tests: workflows: - - lint: { } - - unit_test: { } - - integration_test: { } - - test_binary_build: { } - -app: - envs: - - SRC_DIR_IN_GOPATH: $GOPATH/src/github.com/bitrise-io/bitrise + - run_lint: { } + - run_unit_tests_macos: { } + - run_unit_tests_linux: { } + - run_integration_tests_macos: { } + - run_integration_tests_linux: { } + - test_binary_build_macos: { } + - test_binary_build_linux: { } workflows: - lint: + run_lint: + steps: + - bundle::run_lint: { } + + run_unit_tests_macos: + steps: + - bundle::run_unit_tests: { } + meta: + bitrise.io: + stack: osx-xcode-16.0.x + machine_type_id: g2.mac.large + + run_unit_tests_linux: + steps: + - bundle::run_unit_tests: { } + meta: + bitrise.io: + machine_type_id: elite-xl + stack: linux-docker-android-22.04 + + run_integration_tests_macos: + steps: + - bundle::run_integration_tests: { } + meta: + bitrise.io: + stack: osx-xcode-16.0.x + machine_type_id: g2.mac.large + + run_integration_tests_linux: + steps: + - bundle::run_integration_tests: { } + meta: + bitrise.io: + machine_type_id: elite-xl + stack: linux-docker-android-22.04 + + test_binary_build_macos: + steps: + - bundle::test_binary_build: { } + meta: + bitrise.io: + stack: osx-xcode-16.0.x + machine_type_id: g2.mac.large + + test_binary_build_linux: + steps: + - bundle::test_binary_build: { } + meta: + bitrise.io: + machine_type_id: elite-xl + stack: linux-docker-android-22.04 + + release: + steps: + - trigger-bitrise-workflow@0.0.8: + inputs: + - api_token: "$CONTROL_CENTER_TRIGGER_KEY" + - workflow_id: binary-tool-release + - exported_environment_variable_names: GIT_REPOSITORY_URL + - app_slug: "$CONTROL_CENTER_APP_SLUG" + meta: + bitrise.io: + machine_type_id: elite-xl + stack: linux-docker-android-22.04 + + +step_bundles: + run_lint: steps: - script@1: title: Setup YAML lint @@ -39,9 +108,6 @@ workflows: set -ex apt-get update apt-get --assume-yes install python3.8-venv - - change-workdir: - inputs: - - path: ${SRC_DIR_IN_GOPATH} - git-clone: inputs: - fetch_tags: "yes" @@ -51,11 +117,8 @@ workflows: - skip_step_yml_validation: "yes" - deploy-to-bitrise-io: { } - unit_test: + run_unit_tests: steps: - - change-workdir: - inputs: - - path: ${SRC_DIR_IN_GOPATH} - git-clone: inputs: - fetch_tags: "yes" @@ -66,12 +129,8 @@ workflows: - content: go test -p 1 $BITRISE_GO_PACKAGES - deploy-to-bitrise-io: { } - integration_test: - title: Runs integration tests + run_integration_tests: steps: - - change-workdir: - inputs: - - path: ${SRC_DIR_IN_GOPATH} - git-clone: inputs: - fetch_tags: "yes" @@ -81,25 +140,24 @@ workflows: - content: |- #!/usr/bin/env bash set -ex - + current_bitrise="$(pwd)/_tmp/test_bitrise" export CGO_ENABLED=0 go build -o "$current_bitrise" - + export PR="" PULL_REQUEST_ID="" export INTEGRATION_TEST_BINARY_PATH="$current_bitrise" - + $current_bitrise setup - + go test -v ./_tests/integration/ --tags linux_and_mac - + if [ "$(uname)" == "Linux" ]; then go test -v ./_tests/integration/ --tags linux_only fi - deploy-to-bitrise-io: { } test_binary_build: - description: Tests the release build process by creating a snapshot release (without publishing) steps: - script@1: title: Set up Goreleaser @@ -115,9 +173,6 @@ workflows: wget -O /tmp/goreleaser.deb https://github.com/goreleaser/goreleaser/releases/download/v1.19.2/goreleaser_1.19.2_amd64.deb sudo dpkg -i /tmp/goreleaser.deb - - change-workdir: - inputs: - - path: ${SRC_DIR_IN_GOPATH} - git-clone: inputs: - fetch_tags: "yes" @@ -137,4 +192,4 @@ workflows: meta: bitrise.io: machine_type_id: elite-xl - stack: linux-docker-android-20.04 + stack: linux-docker-android-22.04 From b853e00887458c85a1df6dbd7055a9f952a4f1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 17 Sep 2024 15:31:27 +0200 Subject: [PATCH 03/45] Lock steps on major versions --- bitrise.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 7197a3530..55bb0bbea 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -83,7 +83,7 @@ workflows: release: steps: - - trigger-bitrise-workflow@0.0.8: + - trigger-bitrise-workflow@0: inputs: - api_token: "$CONTROL_CENTER_TRIGGER_KEY" - workflow_id: binary-tool-release @@ -94,7 +94,6 @@ workflows: machine_type_id: elite-xl stack: linux-docker-android-22.04 - step_bundles: run_lint: steps: @@ -108,33 +107,33 @@ step_bundles: set -ex apt-get update apt-get --assume-yes install python3.8-venv - - git-clone: + - git-clone@8: inputs: - fetch_tags: "yes" - git::https://github.com/bitrise-steplib/steps-check.git: inputs: - workflow: lint - skip_step_yml_validation: "yes" - - deploy-to-bitrise-io: { } + - deploy-to-bitrise-io@2: { } run_unit_tests: steps: - - git-clone: + - git-clone@8: inputs: - fetch_tags: "yes" - - go-list: { } - - script: + - go-list@1: { } + - script@1: title: Go test inputs: - content: go test -p 1 $BITRISE_GO_PACKAGES - - deploy-to-bitrise-io: { } + - deploy-to-bitrise-io@2: { } run_integration_tests: steps: - - git-clone: + - git-clone@8: inputs: - fetch_tags: "yes" - - script: + - script@1: title: Run integration tests inputs: - content: |- @@ -155,7 +154,7 @@ step_bundles: if [ "$(uname)" == "Linux" ]; then go test -v ./_tests/integration/ --tags linux_only fi - - deploy-to-bitrise-io: { } + - deploy-to-bitrise-io@2: { } test_binary_build: steps: @@ -173,10 +172,10 @@ step_bundles: wget -O /tmp/goreleaser.deb https://github.com/goreleaser/goreleaser/releases/download/v1.19.2/goreleaser_1.19.2_amd64.deb sudo dpkg -i /tmp/goreleaser.deb - - git-clone: + - git-clone@8: inputs: - fetch_tags: "yes" - - script: + - script@1: title: Goreleaser (create snapshot binaries) deps: brew: @@ -187,7 +186,7 @@ step_bundles: set -ex goreleaser release --snapshot --rm-dist - - deploy-to-bitrise-io: { } + - deploy-to-bitrise-io@2: { } meta: bitrise.io: From e2f6eae62a60d371fdb31887a48bc1421f9d749e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 17 Sep 2024 15:42:02 +0200 Subject: [PATCH 04/45] Fix goreleaser setup --- bitrise.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 55bb0bbea..a268a10bc 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -159,19 +159,13 @@ step_bundles: test_binary_build: steps: - script@1: - title: Set up Goreleaser inputs: - content: |- #!/usr/bin/env bash # fail if any commands fails - set -e - # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully - set -o pipefail - # debug log - set -x - - wget -O /tmp/goreleaser.deb https://github.com/goreleaser/goreleaser/releases/download/v1.19.2/goreleaser_1.19.2_amd64.deb - sudo dpkg -i /tmp/goreleaser.deb + set -ex + + go install github.com/goreleaser/goreleaser@latest - git-clone@8: inputs: - fetch_tags: "yes" From eced16166f69dde6b3791ad2b159ced7eab83e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 17 Sep 2024 15:45:43 +0200 Subject: [PATCH 05/45] Update binary build tests --- bitrise.yml | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index a268a10bc..99857abc3 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -67,6 +67,14 @@ workflows: test_binary_build_macos: steps: + - script@1: + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -ex + + go install github.com/goreleaser/goreleaser@latest - bundle::test_binary_build: { } meta: bitrise.io: @@ -75,6 +83,20 @@ workflows: test_binary_build_linux: steps: + - script@1: + title: Set up Goreleaser + inputs: + - content: |- + #!/usr/bin/env bash + # fail if any commands fails + set -e + # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully + set -o pipefail + # debug log + set -x + + wget -O /tmp/goreleaser.deb https://github.com/goreleaser/goreleaser/releases/download/v1.19.2/goreleaser_1.19.2_amd64.deb + sudo dpkg -i /tmp/goreleaser.deb - bundle::test_binary_build: { } meta: bitrise.io: @@ -158,14 +180,6 @@ step_bundles: test_binary_build: steps: - - script@1: - inputs: - - content: |- - #!/usr/bin/env bash - # fail if any commands fails - set -ex - - go install github.com/goreleaser/goreleaser@latest - git-clone@8: inputs: - fetch_tags: "yes" From abbe7738a2f52d4c8c1607dd1774b4283c6b6f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 17 Sep 2024 15:48:52 +0200 Subject: [PATCH 06/45] Remove yaml lint setup --- bitrise.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 99857abc3..300ed0637 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -119,16 +119,6 @@ workflows: step_bundles: run_lint: steps: - - script@1: - title: Setup YAML lint - inputs: - - script_file_path: - - content: |- - #!/usr/bin/env bash - # fail if any commands fails - set -ex - apt-get update - apt-get --assume-yes install python3.8-venv - git-clone@8: inputs: - fetch_tags: "yes" From 96dcc99608b74cb66f509d0799a8e45f7a36c953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 17 Sep 2024 15:50:31 +0200 Subject: [PATCH 07/45] Fix yaml lint issues --- bitrise.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 300ed0637..651c3198e 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -107,10 +107,10 @@ workflows: steps: - trigger-bitrise-workflow@0: inputs: - - api_token: "$CONTROL_CENTER_TRIGGER_KEY" + - api_token: $CONTROL_CENTER_TRIGGER_KEY - workflow_id: binary-tool-release - exported_environment_variable_names: GIT_REPOSITORY_URL - - app_slug: "$CONTROL_CENTER_APP_SLUG" + - app_slug: $CONTROL_CENTER_APP_SLUG meta: bitrise.io: machine_type_id: elite-xl @@ -151,18 +151,18 @@ step_bundles: - content: |- #!/usr/bin/env bash set -ex - + current_bitrise="$(pwd)/_tmp/test_bitrise" export CGO_ENABLED=0 go build -o "$current_bitrise" - + export PR="" PULL_REQUEST_ID="" export INTEGRATION_TEST_BINARY_PATH="$current_bitrise" - + $current_bitrise setup - + go test -v ./_tests/integration/ --tags linux_and_mac - + if [ "$(uname)" == "Linux" ]; then go test -v ./_tests/integration/ --tags linux_only fi From d85a229a7b02fc4d5cbe7da79620547e6c5104e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 17 Sep 2024 16:07:30 +0200 Subject: [PATCH 08/45] Deploy integration tests --- bitrise.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 651c3198e..54ca2188f 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -145,6 +145,13 @@ step_bundles: - git-clone@8: inputs: - fetch_tags: "yes" + - script@1: + title: Setup JUnit XML converter + inputs: + - content: |- + #!/usr/bin/env bash + set -ex + go install github.com/jstemmer/go-junit-report/v2@latest - script@1: title: Run integration tests inputs: @@ -161,10 +168,20 @@ step_bundles: $current_bitrise setup - go test -v ./_tests/integration/ --tags linux_and_mac + integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/integration_test_results" + mkdir "$integration_test_results_dir" + + go test -v ./_tests/integration/ --tags linux_and_mac 2>&1 ./... | go-junit-report -set-exit-code > "$integration_test_results_dir/integration_tests.xml" + + echo '{"test-name":"Integration tests"}' >> "$integration_test_results_dir/test-info.json" if [ "$(uname)" == "Linux" ]; then - go test -v ./_tests/integration/ --tags linux_only + linux_only_integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/linux_only_integration_test_results" + mkdir "linux_only_integration_test_results_dir" + + go test -v ./_tests/integration/ --tags linux_only | go-junit-report -set-exit-code > report.xml "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" + + echo '{"test-name":"Linux only integration tests"}' >> "$linux_only_integration_test_results_dir/test-info.json" fi - deploy-to-bitrise-io@2: { } From c6b93f3680af4d04833ed067559e8cc06890fdf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 17 Sep 2024 16:13:14 +0200 Subject: [PATCH 09/45] Add some todos, run linux integration tests on ubuntu-20.4 and print integration test output to stdout --- bitrise.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 54ca2188f..001e546f7 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -63,7 +63,7 @@ workflows: meta: bitrise.io: machine_type_id: elite-xl - stack: linux-docker-android-22.04 + stack: linux-docker-android-20.04 # TODO: Docker tests are failing on Ubuntu 22.04 test_binary_build_macos: steps: @@ -83,7 +83,7 @@ workflows: test_binary_build_linux: steps: - - script@1: + - script@1: # TODO: Unify with goreleaser setup with macOS title: Set up Goreleaser inputs: - content: |- @@ -171,7 +171,7 @@ step_bundles: integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/integration_test_results" mkdir "$integration_test_results_dir" - go test -v ./_tests/integration/ --tags linux_and_mac 2>&1 ./... | go-junit-report -set-exit-code > "$integration_test_results_dir/integration_tests.xml" + go test -v ./_tests/integration/ --tags linux_and_mac 2>&1 ./... | go-junit-report -iocopy -set-exit-code > "$integration_test_results_dir/integration_tests.xml" echo '{"test-name":"Integration tests"}' >> "$integration_test_results_dir/test-info.json" @@ -179,7 +179,7 @@ step_bundles: linux_only_integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/linux_only_integration_test_results" mkdir "linux_only_integration_test_results_dir" - go test -v ./_tests/integration/ --tags linux_only | go-junit-report -set-exit-code > report.xml "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" + go test -v ./_tests/integration/ --tags linux_only | go-junit-report -iocopy -set-exit-code > report.xml "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" echo '{"test-name":"Linux only integration tests"}' >> "$linux_only_integration_test_results_dir/test-info.json" fi From c4d4fe699c0ffe4c860e6a98c0d763580e4ca8a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 17 Sep 2024 16:15:48 +0200 Subject: [PATCH 10/45] Fix junit reporter --- bitrise.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 001e546f7..84fa3176b 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -171,7 +171,7 @@ step_bundles: integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/integration_test_results" mkdir "$integration_test_results_dir" - go test -v ./_tests/integration/ --tags linux_and_mac 2>&1 ./... | go-junit-report -iocopy -set-exit-code > "$integration_test_results_dir/integration_tests.xml" + go test -v ./_tests/integration/ --tags linux_and_mac 2>&1 ./... | go-junit-report -iocopy -set-exit-code -out "$integration_test_results_dir/integration_tests.xml" echo '{"test-name":"Integration tests"}' >> "$integration_test_results_dir/test-info.json" @@ -179,7 +179,7 @@ step_bundles: linux_only_integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/linux_only_integration_test_results" mkdir "linux_only_integration_test_results_dir" - go test -v ./_tests/integration/ --tags linux_only | go-junit-report -iocopy -set-exit-code > report.xml "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" + go test -v ./_tests/integration/ --tags linux_only | go-junit-report -iocopy -set-exit-code -out report.xml "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" echo '{"test-name":"Linux only integration tests"}' >> "$linux_only_integration_test_results_dir/test-info.json" fi From 205a77c4ed706f35d0cae63126df23a56842dcc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 17 Sep 2024 16:26:08 +0200 Subject: [PATCH 11/45] Deploy unit test results --- bitrise.yml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 84fa3176b..137d5b47a 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -130,21 +130,35 @@ step_bundles: run_unit_tests: steps: + - script@1: + title: Setup JUnit XML converter + inputs: + - content: |- + #!/usr/bin/env bash + set -ex + go install github.com/jstemmer/go-junit-report/v2@latest - git-clone@8: inputs: - fetch_tags: "yes" - go-list@1: { } - script@1: - title: Go test inputs: - - content: go test -p 1 $BITRISE_GO_PACKAGES + - content: |- + #!/usr/bin/env bash + set -ex + + unit_test_results_dir="$BITRISE_TEST_RESULT_DIR/unit_test_results" + mkdir "$unit_test_results_dir" + + code_coverage_report_pth="$BITRISE_DEPLOY_DIR/coverage.txt" + + go test -v -race -coverprofile=$code_coverage_report_pth -covermode=atomic $BITRISE_GO_PACKAGES 2>&1 | go-junit-report -iocopy -set-exit-code -out "$unit_test_results_dir/unit_tests.xml" + + echo '{"test-name":"Unit tests"}' >> "$unit_test_results_dir/test-info.json" - deploy-to-bitrise-io@2: { } run_integration_tests: steps: - - git-clone@8: - inputs: - - fetch_tags: "yes" - script@1: title: Setup JUnit XML converter inputs: @@ -152,6 +166,9 @@ step_bundles: #!/usr/bin/env bash set -ex go install github.com/jstemmer/go-junit-report/v2@latest + - git-clone@8: + inputs: + - fetch_tags: "yes" - script@1: title: Run integration tests inputs: From 955a5f4a7b76e63f6c9315aa63b9624bdc7fbef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 17 Sep 2024 17:00:33 +0200 Subject: [PATCH 12/45] Lint issue fixes --- bitrise.yml | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 137d5b47a..bf20e8529 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -63,7 +63,7 @@ workflows: meta: bitrise.io: machine_type_id: elite-xl - stack: linux-docker-android-20.04 # TODO: Docker tests are failing on Ubuntu 22.04 + stack: linux-docker-android-20.04 # TODO: Docker tests are failing on Ubuntu 22.04 test_binary_build_macos: steps: @@ -83,7 +83,7 @@ workflows: test_binary_build_linux: steps: - - script@1: # TODO: Unify with goreleaser setup with macOS + - script@1: # TODO: Unify with goreleaser setup with macOS title: Set up Goreleaser inputs: - content: |- @@ -146,15 +146,19 @@ step_bundles: - content: |- #!/usr/bin/env bash set -ex - + unit_test_results_dir="$BITRISE_TEST_RESULT_DIR/unit_test_results" mkdir "$unit_test_results_dir" - + code_coverage_report_pth="$BITRISE_DEPLOY_DIR/coverage.txt" - + go test -v -race -coverprofile=$code_coverage_report_pth -covermode=atomic $BITRISE_GO_PACKAGES 2>&1 | go-junit-report -iocopy -set-exit-code -out "$unit_test_results_dir/unit_tests.xml" - - echo '{"test-name":"Unit tests"}' >> "$unit_test_results_dir/test-info.json" + + if [ "$(uname)" == "Linux" ]; then + echo '{"test-name":"Unit tests (Linux)"}' >> "$unit_test_results_dir/test-info.json" + else + echo '{"test-name":"Unit tests (macOS)"}' >> "$unit_test_results_dir/test-info.json" + fi - deploy-to-bitrise-io@2: { } run_integration_tests: @@ -187,17 +191,21 @@ step_bundles: integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/integration_test_results" mkdir "$integration_test_results_dir" - + go test -v ./_tests/integration/ --tags linux_and_mac 2>&1 ./... | go-junit-report -iocopy -set-exit-code -out "$integration_test_results_dir/integration_tests.xml" - - echo '{"test-name":"Integration tests"}' >> "$integration_test_results_dir/test-info.json" + + if [ "$(uname)" == "Linux" ]; then + echo '{"test-name":"Integration tests (Linux)"}' >> "$integration_test_results_dir/test-info.json" + else + echo '{"test-name":"Integration tests (macOS)"}' >> "$integration_test_results_dir/test-info.json" + fi if [ "$(uname)" == "Linux" ]; then linux_only_integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/linux_only_integration_test_results" mkdir "linux_only_integration_test_results_dir" - go test -v ./_tests/integration/ --tags linux_only | go-junit-report -iocopy -set-exit-code -out report.xml "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" - + go test -v ./_tests/integration/ --tags linux_only | go-junit-report -iocopy -set-exit-code -out "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" + echo '{"test-name":"Linux only integration tests"}' >> "$linux_only_integration_test_results_dir/test-info.json" fi - deploy-to-bitrise-io@2: { } From 15577ae2c1ac39a3010d2980690b421128d85188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Wed, 18 Sep 2024 09:17:18 +0200 Subject: [PATCH 13/45] Fix lint issue --- bitrise.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitrise.yml b/bitrise.yml index bf20e8529..49f77657d 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -203,7 +203,7 @@ step_bundles: if [ "$(uname)" == "Linux" ]; then linux_only_integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/linux_only_integration_test_results" mkdir "linux_only_integration_test_results_dir" - + go test -v ./_tests/integration/ --tags linux_only | go-junit-report -iocopy -set-exit-code -out "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" echo '{"test-name":"Linux only integration tests"}' >> "$linux_only_integration_test_results_dir/test-info.json" From a214b2412f0b6c7e26f543d8808857af4555490c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Wed, 18 Sep 2024 09:19:30 +0200 Subject: [PATCH 14/45] Fix linux integration tests --- bitrise.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitrise.yml b/bitrise.yml index 49f77657d..c74d6babb 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -202,7 +202,7 @@ step_bundles: if [ "$(uname)" == "Linux" ]; then linux_only_integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/linux_only_integration_test_results" - mkdir "linux_only_integration_test_results_dir" + mkdir "$linux_only_integration_test_results_dir" go test -v ./_tests/integration/ --tags linux_only | go-junit-report -iocopy -set-exit-code -out "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" From cd816e43cf54fbace7a4b3c1f91d222b0d252ac0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Wed, 18 Sep 2024 15:45:35 +0200 Subject: [PATCH 15/45] Update unit_test bundle --- bitrise.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index c74d6babb..56f9fb17d 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -150,9 +150,7 @@ step_bundles: unit_test_results_dir="$BITRISE_TEST_RESULT_DIR/unit_test_results" mkdir "$unit_test_results_dir" - code_coverage_report_pth="$BITRISE_DEPLOY_DIR/coverage.txt" - - go test -v -race -coverprofile=$code_coverage_report_pth -covermode=atomic $BITRISE_GO_PACKAGES 2>&1 | go-junit-report -iocopy -set-exit-code -out "$unit_test_results_dir/unit_tests.xml" + go test -v -p 1 $BITRISE_GO_PACKAGES | go-junit-report -iocopy -set-exit-code -out "$unit_test_results_dir/unit_tests.xml" if [ "$(uname)" == "Linux" ]; then echo '{"test-name":"Unit tests (Linux)"}' >> "$unit_test_results_dir/test-info.json" From dbf88eddfec22dbe7cc65c27721fbe3338b934e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Wed, 18 Sep 2024 15:51:30 +0200 Subject: [PATCH 16/45] CI fixes --- bitrise.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 56f9fb17d..702d24905 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -137,6 +137,10 @@ step_bundles: #!/usr/bin/env bash set -ex go install github.com/jstemmer/go-junit-report/v2@latest + + if [ "$(uname)" == "Linux" ]; then + export PATH="$HOME/go/bin:$PATH" + fi - git-clone@8: inputs: - fetch_tags: "yes" @@ -148,7 +152,7 @@ step_bundles: set -ex unit_test_results_dir="$BITRISE_TEST_RESULT_DIR/unit_test_results" - mkdir "$unit_test_results_dir" + mkdir -p "$unit_test_results_dir" go test -v -p 1 $BITRISE_GO_PACKAGES | go-junit-report -iocopy -set-exit-code -out "$unit_test_results_dir/unit_tests.xml" @@ -188,7 +192,7 @@ step_bundles: $current_bitrise setup integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/integration_test_results" - mkdir "$integration_test_results_dir" + mkdir -p "$integration_test_results_dir" go test -v ./_tests/integration/ --tags linux_and_mac 2>&1 ./... | go-junit-report -iocopy -set-exit-code -out "$integration_test_results_dir/integration_tests.xml" @@ -200,7 +204,7 @@ step_bundles: if [ "$(uname)" == "Linux" ]; then linux_only_integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/linux_only_integration_test_results" - mkdir "$linux_only_integration_test_results_dir" + mkdir -p "$linux_only_integration_test_results_dir" go test -v ./_tests/integration/ --tags linux_only | go-junit-report -iocopy -set-exit-code -out "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" From 1aa3480052919ee0e0407ce92ae2ebe8ae3db88d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Thu, 19 Sep 2024 09:37:45 +0200 Subject: [PATCH 17/45] Fix go tool installation on Ubuntu stacks --- bitrise.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 702d24905..06db44e55 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -137,9 +137,9 @@ step_bundles: #!/usr/bin/env bash set -ex go install github.com/jstemmer/go-junit-report/v2@latest - + if [ "$(uname)" == "Linux" ]; then - export PATH="$HOME/go/bin:$PATH" + asdf reshim golang fi - git-clone@8: inputs: From c9c44af9332d904ee4397fe8de659b34cd3af700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Thu, 19 Sep 2024 10:31:39 +0200 Subject: [PATCH 18/45] Create test result files --- bitrise.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 06db44e55..a61df808f 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -157,9 +157,9 @@ step_bundles: go test -v -p 1 $BITRISE_GO_PACKAGES | go-junit-report -iocopy -set-exit-code -out "$unit_test_results_dir/unit_tests.xml" if [ "$(uname)" == "Linux" ]; then - echo '{"test-name":"Unit tests (Linux)"}' >> "$unit_test_results_dir/test-info.json" + echo '{"test-name":"Unit tests (Linux)"}' > "$unit_test_results_dir/test-info.json" else - echo '{"test-name":"Unit tests (macOS)"}' >> "$unit_test_results_dir/test-info.json" + echo '{"test-name":"Unit tests (macOS)"}' > "$unit_test_results_dir/test-info.json" fi - deploy-to-bitrise-io@2: { } @@ -197,9 +197,9 @@ step_bundles: go test -v ./_tests/integration/ --tags linux_and_mac 2>&1 ./... | go-junit-report -iocopy -set-exit-code -out "$integration_test_results_dir/integration_tests.xml" if [ "$(uname)" == "Linux" ]; then - echo '{"test-name":"Integration tests (Linux)"}' >> "$integration_test_results_dir/test-info.json" + echo '{"test-name":"Integration tests (Linux)"}' > "$integration_test_results_dir/test-info.json" else - echo '{"test-name":"Integration tests (macOS)"}' >> "$integration_test_results_dir/test-info.json" + echo '{"test-name":"Integration tests (macOS)"}' > "$integration_test_results_dir/test-info.json" fi if [ "$(uname)" == "Linux" ]; then @@ -208,7 +208,7 @@ step_bundles: go test -v ./_tests/integration/ --tags linux_only | go-junit-report -iocopy -set-exit-code -out "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" - echo '{"test-name":"Linux only integration tests"}' >> "$linux_only_integration_test_results_dir/test-info.json" + echo '{"test-name":"Linux only integration tests"}' > "$linux_only_integration_test_results_dir/test-info.json" fi - deploy-to-bitrise-io@2: { } From e7686be2495639b002df090efc0ec9737a1b98d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Fri, 27 Sep 2024 13:48:16 +0200 Subject: [PATCH 19/45] Fix unit tests --- bitrise.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index a61df808f..ee9144f8f 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -152,14 +152,15 @@ step_bundles: set -ex unit_test_results_dir="$BITRISE_TEST_RESULT_DIR/unit_test_results" - mkdir -p "$unit_test_results_dir" + mkdir -p "${unit_test_results_dir}" - go test -v -p 1 $BITRISE_GO_PACKAGES | go-junit-report -iocopy -set-exit-code -out "$unit_test_results_dir/unit_tests.xml" + go test -v -p 1 $BITRISE_GO_PACKAGES | go-junit-report -iocopy -set-exit-code -out "${unit_test_results_dir}/unit_tests.xml" - if [ "$(uname)" == "Linux" ]; then - echo '{"test-name":"Unit tests (Linux)"}' > "$unit_test_results_dir/test-info.json" + touch "${unit_test_results_dir}/test-info.json" + if [ "$(uname)" == "Linux" ]; then + echo '{"test-name":"Unit tests (Linux)"}' > "${unit_test_results_dir}/test-info.json" else - echo '{"test-name":"Unit tests (macOS)"}' > "$unit_test_results_dir/test-info.json" + echo '{"test-name":"Unit tests (macOS)"}' > "${unit_test_results_dir}/test-info.json" fi - deploy-to-bitrise-io@2: { } From 15cc547b7379234c5a69fb3c818e0e3018cdc08f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Fri, 27 Sep 2024 13:56:47 +0200 Subject: [PATCH 20/45] Fix linux integration tests --- bitrise.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bitrise.yml b/bitrise.yml index ee9144f8f..eb279cc95 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -59,7 +59,9 @@ workflows: run_integration_tests_linux: steps: - - bundle::run_integration_tests: { } + - bundle::run_integration_tests: + envs: + - SRC_DIR_IN_GOPATH: $BITRISE_SOURCE_DIR meta: bitrise.io: machine_type_id: elite-xl From d2f3853694b2188727c5f1f19c26ffa554565b0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Mon, 30 Sep 2024 09:50:51 +0200 Subject: [PATCH 21/45] Fix unit test command --- bitrise.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index eb279cc95..4da1e3f60 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -156,9 +156,8 @@ step_bundles: unit_test_results_dir="$BITRISE_TEST_RESULT_DIR/unit_test_results" mkdir -p "${unit_test_results_dir}" - go test -v -p 1 $BITRISE_GO_PACKAGES | go-junit-report -iocopy -set-exit-code -out "${unit_test_results_dir}/unit_tests.xml" + go test -v -p 1 $BITRISE_GO_PACKAGES 2>&1 | go-junit-report -iocopy -set-exit-code -out "${unit_test_results_dir}/unit_tests.xml" - touch "${unit_test_results_dir}/test-info.json" if [ "$(uname)" == "Linux" ]; then echo '{"test-name":"Unit tests (Linux)"}' > "${unit_test_results_dir}/test-info.json" else @@ -209,7 +208,7 @@ step_bundles: linux_only_integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/linux_only_integration_test_results" mkdir -p "$linux_only_integration_test_results_dir" - go test -v ./_tests/integration/ --tags linux_only | go-junit-report -iocopy -set-exit-code -out "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" + go test -v ./_tests/integration/ --tags linux_only 2>&1 | go-junit-report -iocopy -set-exit-code -out "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" echo '{"test-name":"Linux only integration tests"}' > "$linux_only_integration_test_results_dir/test-info.json" fi From 37b1053487f5835d44836681bd7392d5bad256ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Mon, 30 Sep 2024 09:53:10 +0200 Subject: [PATCH 22/45] Fix lint issue --- bitrise.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitrise.yml b/bitrise.yml index 4da1e3f60..3dd01a6c7 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -158,7 +158,7 @@ step_bundles: go test -v -p 1 $BITRISE_GO_PACKAGES 2>&1 | go-junit-report -iocopy -set-exit-code -out "${unit_test_results_dir}/unit_tests.xml" - if [ "$(uname)" == "Linux" ]; then + if [ "$(uname)" == "Linux" ]; then echo '{"test-name":"Unit tests (Linux)"}' > "${unit_test_results_dir}/test-info.json" else echo '{"test-name":"Unit tests (macOS)"}' > "${unit_test_results_dir}/test-info.json" From 9b12bb83a61275c6d2b2e76a34bdfdfd70b276aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Mon, 30 Sep 2024 10:08:44 +0200 Subject: [PATCH 23/45] Debug unit test result dir --- bitrise.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/bitrise.yml b/bitrise.yml index 3dd01a6c7..49ba05b14 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -157,6 +157,7 @@ step_bundles: mkdir -p "${unit_test_results_dir}" go test -v -p 1 $BITRISE_GO_PACKAGES 2>&1 | go-junit-report -iocopy -set-exit-code -out "${unit_test_results_dir}/unit_tests.xml" + tree -L 3 "${unit_test_results_dir}" if [ "$(uname)" == "Linux" ]; then echo '{"test-name":"Unit tests (Linux)"}' > "${unit_test_results_dir}/test-info.json" From 682e5ee1e34531238e7ff63d522e8452cf2fee52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 1 Oct 2024 13:33:58 +0200 Subject: [PATCH 24/45] Improve unit test bundle --- bitrise.yml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 49ba05b14..3436d362c 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -152,14 +152,27 @@ step_bundles: - content: |- #!/usr/bin/env bash set -ex - - unit_test_results_dir="$BITRISE_TEST_RESULT_DIR/unit_test_results" + + # Ensure required environment variables are set + if [ -z "${BITRISE_TEST_RESULT_DIR}" ] || [ -z "${BITRISE_GO_PACKAGES}" ]; then + echo "Required environment variables BITRISE_TEST_RESULT_DIR or BITRISE_GO_PACKAGES are not set." + exit 1 + fi + + # Create the results directory + unit_test_results_dir="${BITRISE_TEST_RESULT_DIR}/unit_test_results" mkdir -p "${unit_test_results_dir}" - - go test -v -p 1 $BITRISE_GO_PACKAGES 2>&1 | go-junit-report -iocopy -set-exit-code -out "${unit_test_results_dir}/unit_tests.xml" - tree -L 3 "${unit_test_results_dir}" - - if [ "$(uname)" == "Linux" ]; then + + # Run tests and generate report + if ! go test -v -p 1 "${BITRISE_GO_PACKAGES}" 2>&1 | go-junit-report -iocopy -set-exit-code -out "${unit_test_results_dir}/unit_tests.xml"; then + echo "go test or go-junit-report failed." + exit 1 + fi + + cat "${unit_test_results_dir}/unit_tests.xml" + + # Create JSON file based on OS + if [ "$(uname)" = "Linux" ]; then echo '{"test-name":"Unit tests (Linux)"}' > "${unit_test_results_dir}/test-info.json" else echo '{"test-name":"Unit tests (macOS)"}' > "${unit_test_results_dir}/test-info.json" From 89db51306ef3f3e0e025d18a597e998708df516d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 1 Oct 2024 14:02:16 +0200 Subject: [PATCH 25/45] Update go test scripts --- bitrise.yml | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 3436d362c..cc8d9f5f4 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -146,32 +146,22 @@ step_bundles: - git-clone@8: inputs: - fetch_tags: "yes" - - go-list@1: { } - script@1: inputs: - content: |- #!/usr/bin/env bash - set -ex - - # Ensure required environment variables are set - if [ -z "${BITRISE_TEST_RESULT_DIR}" ] || [ -z "${BITRISE_GO_PACKAGES}" ]; then - echo "Required environment variables BITRISE_TEST_RESULT_DIR or BITRISE_GO_PACKAGES are not set." - exit 1 - fi + set -exo pipefail # Create the results directory unit_test_results_dir="${BITRISE_TEST_RESULT_DIR}/unit_test_results" mkdir -p "${unit_test_results_dir}" # Run tests and generate report - if ! go test -v -p 1 "${BITRISE_GO_PACKAGES}" 2>&1 | go-junit-report -iocopy -set-exit-code -out "${unit_test_results_dir}/unit_tests.xml"; then + if ! go test -v -p 1 ./... 2>&1 | go-junit-report -iocopy -set-exit-code -out "${unit_test_results_dir}/unit_tests.xml"; then echo "go test or go-junit-report failed." exit 1 fi - cat "${unit_test_results_dir}/unit_tests.xml" - - # Create JSON file based on OS if [ "$(uname)" = "Linux" ]; then echo '{"test-name":"Unit tests (Linux)"}' > "${unit_test_results_dir}/test-info.json" else @@ -196,8 +186,9 @@ step_bundles: inputs: - content: |- #!/usr/bin/env bash - set -ex + set -exo pipefail + # Setup current binary current_bitrise="$(pwd)/_tmp/test_bitrise" export CGO_ENABLED=0 go build -o "$current_bitrise" @@ -206,11 +197,13 @@ step_bundles: export INTEGRATION_TEST_BINARY_PATH="$current_bitrise" $current_bitrise setup - + + # Create the results directory integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/integration_test_results" mkdir -p "$integration_test_results_dir" - go test -v ./_tests/integration/ --tags linux_and_mac 2>&1 ./... | go-junit-report -iocopy -set-exit-code -out "$integration_test_results_dir/integration_tests.xml" + # Run tests and generate report + go test -v --tags linux_and_mac ./_tests/integration/... 2>&1 | go-junit-report -iocopy -set-exit-code -out "$integration_test_results_dir/integration_tests.xml" if [ "$(uname)" == "Linux" ]; then echo '{"test-name":"Integration tests (Linux)"}' > "$integration_test_results_dir/test-info.json" @@ -218,11 +211,12 @@ step_bundles: echo '{"test-name":"Integration tests (macOS)"}' > "$integration_test_results_dir/test-info.json" fi + # Run linux only tests and generate report if [ "$(uname)" == "Linux" ]; then linux_only_integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/linux_only_integration_test_results" mkdir -p "$linux_only_integration_test_results_dir" - go test -v ./_tests/integration/ --tags linux_only 2>&1 | go-junit-report -iocopy -set-exit-code -out "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" + go test -v --tags linux_only ./_tests/integration/... 2>&1 | go-junit-report -iocopy -set-exit-code -out "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" echo '{"test-name":"Linux only integration tests"}' > "$linux_only_integration_test_results_dir/test-info.json" fi From 42755499083ab14f30056eaeafc1e08f2dff7708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 1 Oct 2024 14:09:00 +0200 Subject: [PATCH 26/45] debug unit test reults --- bitrise.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bitrise.yml b/bitrise.yml index cc8d9f5f4..b538af2c4 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -162,6 +162,8 @@ step_bundles: exit 1 fi + cat "${unit_test_results_dir}/unit_tests.xml" + if [ "$(uname)" = "Linux" ]; then echo '{"test-name":"Unit tests (Linux)"}' > "${unit_test_results_dir}/test-info.json" else From 344cee2756bbb5e9541d6733eb56c5118c9de5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 1 Oct 2024 14:20:07 +0200 Subject: [PATCH 27/45] Update --- bitrise.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index b538af2c4..156a0ce85 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -157,10 +157,8 @@ step_bundles: mkdir -p "${unit_test_results_dir}" # Run tests and generate report - if ! go test -v -p 1 ./... 2>&1 | go-junit-report -iocopy -set-exit-code -out "${unit_test_results_dir}/unit_tests.xml"; then - echo "go test or go-junit-report failed." - exit 1 - fi + go test -v -p 1 ./... 2>&1 | tee "${unit_test_results_dir}/unit_tests.log" + go-junit-report -in "${unit_test_results_dir}/unit_tests.log" -out "${unit_test_results_dir}/unit_tests.xml cat "${unit_test_results_dir}/unit_tests.xml" From 1f53974168a87fefa2cdef157c8305fbe60ee2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 1 Oct 2024 16:08:10 +0200 Subject: [PATCH 28/45] Fix --- bitrise.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 156a0ce85..8a933f3cc 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -158,12 +158,12 @@ step_bundles: # Run tests and generate report go test -v -p 1 ./... 2>&1 | tee "${unit_test_results_dir}/unit_tests.log" - go-junit-report -in "${unit_test_results_dir}/unit_tests.log" -out "${unit_test_results_dir}/unit_tests.xml + go-junit-report -in "${unit_test_results_dir}/unit_tests.log" -out "${unit_test_results_dir}/unit_tests.xml" cat "${unit_test_results_dir}/unit_tests.xml" if [ "$(uname)" = "Linux" ]; then - echo '{"test-name":"Unit tests (Linux)"}' > "${unit_test_results_dir}/test-info.json" + echo '{"test-name":"Unit tests (Linux)"}' > "{$unit_test_results_dir}/test-info.json" else echo '{"test-name":"Unit tests (macOS)"}' > "${unit_test_results_dir}/test-info.json" fi From 4b040e90e66e6ffc72e05b003769340deb55a930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 1 Oct 2024 16:32:49 +0200 Subject: [PATCH 29/45] Fix --- bitrise.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 8a933f3cc..32a2c94cc 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -152,13 +152,13 @@ step_bundles: #!/usr/bin/env bash set -exo pipefail - # Create the results directory - unit_test_results_dir="${BITRISE_TEST_RESULT_DIR}/unit_test_results" - mkdir -p "${unit_test_results_dir}" + ORIG_BITRISE_TEST_RESULT_DIR="${BITRISE_TEST_RESULT_DIR}" - # Run tests and generate report - go test -v -p 1 ./... 2>&1 | tee "${unit_test_results_dir}/unit_tests.log" - go-junit-report -in "${unit_test_results_dir}/unit_tests.log" -out "${unit_test_results_dir}/unit_tests.xml" + go test -v -p 1 ./... 2>&1 | tee "./unit_tests.log" + + unit_test_results_dir="${ORIG_BITRISE_TEST_RESULT_DIR}/unit_test_results" + mkdir -p "${unit_test_results_dir}" + go-junit-report -in "./unit_tests.log" -out "${unit_test_results_dir}/unit_tests.xml" cat "${unit_test_results_dir}/unit_tests.xml" From a1e10a201225e60bb8516e2f4ed817537bcdc37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Wed, 2 Oct 2024 10:42:20 +0200 Subject: [PATCH 30/45] Update run_unit_tests step bundle --- bitrise.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 32a2c94cc..2e58d8a24 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -150,23 +150,30 @@ step_bundles: inputs: - content: |- #!/usr/bin/env bash - set -exo pipefail + set -ex + # Here we save the original test result directory and later on we recreate it, + # because during the tests the test result directory gets removed. ORIG_BITRISE_TEST_RESULT_DIR="${BITRISE_TEST_RESULT_DIR}" - go test -v -p 1 ./... 2>&1 | tee "./unit_tests.log" - - unit_test_results_dir="${ORIG_BITRISE_TEST_RESULT_DIR}/unit_test_results" - mkdir -p "${unit_test_results_dir}" - go-junit-report -in "./unit_tests.log" -out "${unit_test_results_dir}/unit_tests.xml" - - cat "${unit_test_results_dir}/unit_tests.xml" - + # Setup per OS test name and log file name if [ "$(uname)" = "Linux" ]; then - echo '{"test-name":"Unit tests (Linux)"}' > "{$unit_test_results_dir}/test-info.json" + test_name_json='{"test-name":"Unit tests (Linux)"}' + test_log_file_name="unit_tests_linux" else - echo '{"test-name":"Unit tests (macOS)"}' > "${unit_test_results_dir}/test-info.json" + test_name_json='{"test-name":"Unit tests (macOS)"}' + test_log_file_name="unit_tests_macos" fi + + # Run tests and generate report + go test -v -p 1 ./... 2>&1 | tee "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" + go-junit-report -in "${BITRISE_DEPLOY_DIR}/${test_log_file_name}" -out "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" + + # Copy the junit test results to the test result directory + test_results_dir="${ORIG_BITRISE_TEST_RESULT_DIR}/unit_test_results" + mkdir -p "${test_results_dir}" + cp "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" "${test_results_dir}/${test_log_file_name}.xml" + echo "${test_name_json}" > "${test_results_dir}/test-info.json" - deploy-to-bitrise-io@2: { } run_integration_tests: From bf55c073df8f4c8c1ce87ec98c4d6026d704fcbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Wed, 2 Oct 2024 11:09:22 +0200 Subject: [PATCH 31/45] Fix unit tests and improve ui test bundles --- bitrise.yml | 55 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 2e58d8a24..051764347 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -155,6 +155,7 @@ step_bundles: # Here we save the original test result directory and later on we recreate it, # because during the tests the test result directory gets removed. ORIG_BITRISE_TEST_RESULT_DIR="${BITRISE_TEST_RESULT_DIR}" + ORIG_BITRISE_DEPLOY_DIR="${BITRISE_DEPLOY_DIR}" # Setup per OS test name and log file name if [ "$(uname)" = "Linux" ]; then @@ -166,13 +167,15 @@ step_bundles: fi # Run tests and generate report - go test -v -p 1 ./... 2>&1 | tee "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" - go-junit-report -in "${BITRISE_DEPLOY_DIR}/${test_log_file_name}" -out "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" + go test -v -p 1 ./... 2>&1 | tee "./${test_log_file_name}.log" + mkdir -p "${ORIG_BITRISE_DEPLOY_DIR}" + cp "./${test_log_file_name}.log" "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" + go-junit-report -in "./${test_log_file_name}.log" -out "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" - # Copy the junit test results to the test result directory + # Export the junit test results test_results_dir="${ORIG_BITRISE_TEST_RESULT_DIR}/unit_test_results" mkdir -p "${test_results_dir}" - cp "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" "${test_results_dir}/${test_log_file_name}.xml" + cp "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" "${test_results_dir}/${test_log_file_name}.xml" echo "${test_name_json}" > "${test_results_dir}/test-info.json" - deploy-to-bitrise-io@2: { } @@ -195,7 +198,7 @@ step_bundles: #!/usr/bin/env bash set -exo pipefail - # Setup current binary + # Build and setup the current binary current_bitrise="$(pwd)/_tmp/test_bitrise" export CGO_ENABLED=0 go build -o "$current_bitrise" @@ -208,24 +211,38 @@ step_bundles: # Create the results directory integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/integration_test_results" mkdir -p "$integration_test_results_dir" - - # Run tests and generate report - go test -v --tags linux_and_mac ./_tests/integration/... 2>&1 | go-junit-report -iocopy -set-exit-code -out "$integration_test_results_dir/integration_tests.xml" - - if [ "$(uname)" == "Linux" ]; then - echo '{"test-name":"Integration tests (Linux)"}' > "$integration_test_results_dir/test-info.json" + + # Setup per OS test name and log file name + if [ "$(uname)" = "Linux" ]; then + test_name_json='{"test-name":"Integration tests (Linux)"}' + test_log_file_name="integration_tests_linux" else - echo '{"test-name":"Integration tests (macOS)"}' > "$integration_test_results_dir/test-info.json" + test_name_json='{"test-name":"Integration tests (macOS)"}' + test_log_file_name="integration_tests_macos" fi - # Run linux only tests and generate report - if [ "$(uname)" == "Linux" ]; then - linux_only_integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/linux_only_integration_test_results" - mkdir -p "$linux_only_integration_test_results_dir" - - go test -v --tags linux_only ./_tests/integration/... 2>&1 | go-junit-report -iocopy -set-exit-code -out "$linux_only_integration_test_results_dir/linux_only_integration_tests.xml" + # Run tests and generate report + go test -v --tags linux_and_mac ./_tests/integration/... 2>&1 | tee "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" + go-junit-report -in "${BITRISE_DEPLOY_DIR}/${test_log_file_name}" -out "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" + + # Export the junit test results + test_results_dir="${BITRISE_TEST_RESULT_DIR}/integration_test_results" + mkdir -p "${test_results_dir}" + cp "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" "${test_results_dir}/${test_log_file_name}.xml" + echo "${test_name_json}" > "${test_results_dir}/test-info.json" - echo '{"test-name":"Linux only integration tests"}' > "$linux_only_integration_test_results_dir/test-info.json" + # Run linux only tests and generate and export report + if [ "$(uname)" == "Linux" ]; then + test_name_json='{"test-name":"Linux only integration tests"}' + test_log_file_name="linux_only_integration_tests" + + go test -v --tags linux_only ./_tests/integration/... 2>&1 | tee "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" + go-junit-report -in "${BITRISE_DEPLOY_DIR}/${test_log_file_name}" -out "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" + + test_results_dir="${BITRISE_TEST_RESULT_DIR}/linux_only_integration_test_results" + mkdir -p "${test_results_dir}" + cp "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" "${test_results_dir}/${test_log_file_name}.xml" + echo "${test_name_json}" > "${test_results_dir}/test-info.json" fi - deploy-to-bitrise-io@2: { } From 859f11c9a8d46108f8e6977d941486477b80019d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Wed, 2 Oct 2024 11:12:41 +0200 Subject: [PATCH 32/45] Fix yaml lint issues --- bitrise.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 051764347..027b6dfb8 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -151,12 +151,12 @@ step_bundles: - content: |- #!/usr/bin/env bash set -ex - - # Here we save the original test result directory and later on we recreate it, + + # Here we save the original test result directory and later on we recreate it, # because during the tests the test result directory gets removed. ORIG_BITRISE_TEST_RESULT_DIR="${BITRISE_TEST_RESULT_DIR}" ORIG_BITRISE_DEPLOY_DIR="${BITRISE_DEPLOY_DIR}" - + # Setup per OS test name and log file name if [ "$(uname)" = "Linux" ]; then test_name_json='{"test-name":"Unit tests (Linux)"}' @@ -165,13 +165,13 @@ step_bundles: test_name_json='{"test-name":"Unit tests (macOS)"}' test_log_file_name="unit_tests_macos" fi - + # Run tests and generate report go test -v -p 1 ./... 2>&1 | tee "./${test_log_file_name}.log" mkdir -p "${ORIG_BITRISE_DEPLOY_DIR}" cp "./${test_log_file_name}.log" "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" go-junit-report -in "./${test_log_file_name}.log" -out "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" - + # Export the junit test results test_results_dir="${ORIG_BITRISE_TEST_RESULT_DIR}/unit_test_results" mkdir -p "${test_results_dir}" @@ -207,11 +207,11 @@ step_bundles: export INTEGRATION_TEST_BINARY_PATH="$current_bitrise" $current_bitrise setup - + # Create the results directory integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/integration_test_results" mkdir -p "$integration_test_results_dir" - + # Setup per OS test name and log file name if [ "$(uname)" = "Linux" ]; then test_name_json='{"test-name":"Integration tests (Linux)"}' @@ -224,7 +224,7 @@ step_bundles: # Run tests and generate report go test -v --tags linux_and_mac ./_tests/integration/... 2>&1 | tee "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" go-junit-report -in "${BITRISE_DEPLOY_DIR}/${test_log_file_name}" -out "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" - + # Export the junit test results test_results_dir="${BITRISE_TEST_RESULT_DIR}/integration_test_results" mkdir -p "${test_results_dir}" @@ -235,10 +235,10 @@ step_bundles: if [ "$(uname)" == "Linux" ]; then test_name_json='{"test-name":"Linux only integration tests"}' test_log_file_name="linux_only_integration_tests" - + go test -v --tags linux_only ./_tests/integration/... 2>&1 | tee "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" go-junit-report -in "${BITRISE_DEPLOY_DIR}/${test_log_file_name}" -out "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" - + test_results_dir="${BITRISE_TEST_RESULT_DIR}/linux_only_integration_test_results" mkdir -p "${test_results_dir}" cp "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" "${test_results_dir}/${test_log_file_name}.xml" From 27e256979ccf5aac93855d01f41ee537e40a0a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Wed, 2 Oct 2024 11:49:58 +0200 Subject: [PATCH 33/45] Update tests --- bitrise.yml | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 027b6dfb8..46e7eade8 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -152,8 +152,8 @@ step_bundles: #!/usr/bin/env bash set -ex - # Here we save the original test result directory and later on we recreate it, - # because during the tests the test result directory gets removed. + # Here we save the original test results and deploy directories and later on we recreate them, + # because during the tests these directories are removed. ORIG_BITRISE_TEST_RESULT_DIR="${BITRISE_TEST_RESULT_DIR}" ORIG_BITRISE_DEPLOY_DIR="${BITRISE_DEPLOY_DIR}" @@ -197,6 +197,11 @@ step_bundles: - content: |- #!/usr/bin/env bash set -exo pipefail + + # Here we save the original test results and deploy directories and later on we recreate them, + # because during the tests these directories are removed. + ORIG_BITRISE_TEST_RESULT_DIR="${BITRISE_TEST_RESULT_DIR}" + ORIG_BITRISE_DEPLOY_DIR="${BITRISE_DEPLOY_DIR}" # Build and setup the current binary current_bitrise="$(pwd)/_tmp/test_bitrise" @@ -205,44 +210,48 @@ step_bundles: export PR="" PULL_REQUEST_ID="" export INTEGRATION_TEST_BINARY_PATH="$current_bitrise" - $current_bitrise setup - # Create the results directory - integration_test_results_dir="$BITRISE_TEST_RESULT_DIR/integration_test_results" - mkdir -p "$integration_test_results_dir" - # Setup per OS test name and log file name if [ "$(uname)" = "Linux" ]; then test_name_json='{"test-name":"Integration tests (Linux)"}' test_log_file_name="integration_tests_linux" + linux_only_test_name_json='{"test-name":"Linux only integration tests"}' + linux_only_test_log_file_name="linux_only_integration_tests" else test_name_json='{"test-name":"Integration tests (macOS)"}' test_log_file_name="integration_tests_macos" fi # Run tests and generate report - go test -v --tags linux_and_mac ./_tests/integration/... 2>&1 | tee "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" - go-junit-report -in "${BITRISE_DEPLOY_DIR}/${test_log_file_name}" -out "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" + go test -v --tags linux_and_mac ./_tests/integration/... 2>&1 | tee "./${test_log_file_name}.log" + if [ "$(uname)" = "Linux" ]; then + go test -v --tags linux_only ./_tests/integration/... 2>&1 | tee "./${linux_only_test_log_file_name}.log" + fi + + mkdir -p "${ORIG_BITRISE_DEPLOY_DIR}" + cp "./${test_log_file_name}.log" "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" + if [ "$(uname)" = "Linux" ]; then + cp "./${linux_only_test_log_file_name}.log" "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.log" + fi + + go-junit-report -in "./${test_log_file_name}" -out "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" + if [ "$(uname)" = "Linux" ]; then + go-junit-report -in "./${linux_only_test_log_file_name}" -out "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.xml" + fi # Export the junit test results - test_results_dir="${BITRISE_TEST_RESULT_DIR}/integration_test_results" + test_results_dir="${ORIG_BITRISE_TEST_RESULT_DIR}/integration_test_results" mkdir -p "${test_results_dir}" - cp "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" "${test_results_dir}/${test_log_file_name}.xml" + cp "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" "${test_results_dir}/${test_log_file_name}.xml" echo "${test_name_json}" > "${test_results_dir}/test-info.json" # Run linux only tests and generate and export report if [ "$(uname)" == "Linux" ]; then - test_name_json='{"test-name":"Linux only integration tests"}' - test_log_file_name="linux_only_integration_tests" - - go test -v --tags linux_only ./_tests/integration/... 2>&1 | tee "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" - go-junit-report -in "${BITRISE_DEPLOY_DIR}/${test_log_file_name}" -out "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" - - test_results_dir="${BITRISE_TEST_RESULT_DIR}/linux_only_integration_test_results" + test_results_dir="${ORIG_BITRISE_TEST_RESULT_DIR}/linux_only_integration_test_results" mkdir -p "${test_results_dir}" - cp "${BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" "${test_results_dir}/${test_log_file_name}.xml" - echo "${test_name_json}" > "${test_results_dir}/test-info.json" + cp "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.xml" "${test_results_dir}/${linux_only_test_log_file_name}.xml" + echo "${linux_only_test_name_json}" > "${test_results_dir}/test-info.json" fi - deploy-to-bitrise-io@2: { } From 4e245931b859789df0e54c197bdb2896e04ab686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Wed, 2 Oct 2024 14:10:03 +0200 Subject: [PATCH 34/45] Fix integration tests --- bitrise.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 46e7eade8..79e218e86 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -235,9 +235,9 @@ step_bundles: cp "./${linux_only_test_log_file_name}.log" "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.log" fi - go-junit-report -in "./${test_log_file_name}" -out "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" + go-junit-report -in "./${test_log_file_name}.log" -out "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" if [ "$(uname)" = "Linux" ]; then - go-junit-report -in "./${linux_only_test_log_file_name}" -out "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.xml" + go-junit-report -in "./${linux_only_test_log_file_name}.log" -out "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.xml" fi # Export the junit test results @@ -246,7 +246,6 @@ step_bundles: cp "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" "${test_results_dir}/${test_log_file_name}.xml" echo "${test_name_json}" > "${test_results_dir}/test-info.json" - # Run linux only tests and generate and export report if [ "$(uname)" == "Linux" ]; then test_results_dir="${ORIG_BITRISE_TEST_RESULT_DIR}/linux_only_integration_test_results" mkdir -p "${test_results_dir}" From 0a5458ce94ef6a4008d32fa53c8a1e4b77a00de6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Wed, 2 Oct 2024 14:10:55 +0200 Subject: [PATCH 35/45] Fix yaml lint issues --- bitrise.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 79e218e86..49d256a3e 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -197,7 +197,7 @@ step_bundles: - content: |- #!/usr/bin/env bash set -exo pipefail - + # Here we save the original test results and deploy directories and later on we recreate them, # because during the tests these directories are removed. ORIG_BITRISE_TEST_RESULT_DIR="${BITRISE_TEST_RESULT_DIR}" @@ -228,13 +228,13 @@ step_bundles: if [ "$(uname)" = "Linux" ]; then go test -v --tags linux_only ./_tests/integration/... 2>&1 | tee "./${linux_only_test_log_file_name}.log" fi - + mkdir -p "${ORIG_BITRISE_DEPLOY_DIR}" cp "./${test_log_file_name}.log" "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" if [ "$(uname)" = "Linux" ]; then cp "./${linux_only_test_log_file_name}.log" "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.log" fi - + go-junit-report -in "./${test_log_file_name}.log" -out "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" if [ "$(uname)" = "Linux" ]; then go-junit-report -in "./${linux_only_test_log_file_name}.log" -out "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.xml" From 744760704af86f1bea772670085e95d8b98b4607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Thu, 24 Oct 2024 14:27:32 +0200 Subject: [PATCH 36/45] Add new create-release workflow and create step bundles for setup_go_junit_report and setup_goreleaser --- bitrise.yml | 108 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 66 insertions(+), 42 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 49d256a3e..a2599dedd 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -35,6 +35,7 @@ workflows: run_unit_tests_macos: steps: + - bundle::setup_go_junit_report: { } - bundle::run_unit_tests: { } meta: bitrise.io: @@ -43,6 +44,7 @@ workflows: run_unit_tests_linux: steps: + - bundle::setup_go_junit_report: { } - bundle::run_unit_tests: { } meta: bitrise.io: @@ -51,6 +53,7 @@ workflows: run_integration_tests_macos: steps: + - bundle::setup_go_junit_report: { } - bundle::run_integration_tests: { } meta: bitrise.io: @@ -59,6 +62,7 @@ workflows: run_integration_tests_linux: steps: + - bundle::setup_go_junit_report: { } - bundle::run_integration_tests: envs: - SRC_DIR_IN_GOPATH: $BITRISE_SOURCE_DIR @@ -69,14 +73,7 @@ workflows: test_binary_build_macos: steps: - - script@1: - inputs: - - content: |- - #!/usr/bin/env bash - # fail if any commands fails - set -ex - - go install github.com/goreleaser/goreleaser@latest + - bundle::setup_goreleaser: { } - bundle::test_binary_build: { } meta: bitrise.io: @@ -85,20 +82,7 @@ workflows: test_binary_build_linux: steps: - - script@1: # TODO: Unify with goreleaser setup with macOS - title: Set up Goreleaser - inputs: - - content: |- - #!/usr/bin/env bash - # fail if any commands fails - set -e - # make pipelines' return status equal the last command to exit with a non-zero status, or zero if all commands exit successfully - set -o pipefail - # debug log - set -x - - wget -O /tmp/goreleaser.deb https://github.com/goreleaser/goreleaser/releases/download/v1.19.2/goreleaser_1.19.2_amd64.deb - sudo dpkg -i /tmp/goreleaser.deb + - bundle::setup_goreleaser: { } - bundle::test_binary_build: { } meta: bitrise.io: @@ -118,6 +102,38 @@ workflows: machine_type_id: elite-xl stack: linux-docker-android-22.04 + create-release: + description: Creates Linux and Darwin binaries, then publishes a GitHub release + envs: + - GITHUB_TOKEN: $GIT_BOT_USER_ACCESS_TOKEN # Goreleaser expects this env var + # R2 bucket connection params + - AWS_ENDPOINT_URL: $AWS_ENDPOINT_PROD + - AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID_PROD + - AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY_PROD + steps: + - script@1: + title: Fetch GCS bucket credentials + inputs: + - content: |- + #!/bin/bash + set -ex + + echo "$GCS_BITRISE_CLI_BUCKET_CREDENTIALS" > /tmp/gcs_service_account.json + # Goreleaser expects this env var: + envman add --key GOOGLE_APPLICATION_CREDENTIALS --value /tmp/gcs_service_account.json + - script@1: + title: Goreleaser (create binaries + publish to GH) + deps: + brew: + - name: goreleaser + inputs: + - content: | + #!/usr/bin/env bash + set -ex + + goreleaser release + + step_bundles: run_lint: steps: @@ -132,21 +148,11 @@ step_bundles: run_unit_tests: steps: - - script@1: - title: Setup JUnit XML converter - inputs: - - content: |- - #!/usr/bin/env bash - set -ex - go install github.com/jstemmer/go-junit-report/v2@latest - - if [ "$(uname)" == "Linux" ]; then - asdf reshim golang - fi - git-clone@8: inputs: - fetch_tags: "yes" - script@1: + title: Run unit tests and export results inputs: - content: |- #!/usr/bin/env bash @@ -181,18 +187,11 @@ step_bundles: run_integration_tests: steps: - - script@1: - title: Setup JUnit XML converter - inputs: - - content: |- - #!/usr/bin/env bash - set -ex - go install github.com/jstemmer/go-junit-report/v2@latest - git-clone@8: inputs: - fetch_tags: "yes" - script@1: - title: Run integration tests + title: Run integration tests and export results inputs: - content: |- #!/usr/bin/env bash @@ -260,7 +259,7 @@ step_bundles: inputs: - fetch_tags: "yes" - script@1: - title: Goreleaser (create snapshot binaries) + title: Create snapshot binaries deps: brew: - name: goreleaser @@ -272,6 +271,31 @@ step_bundles: goreleaser release --snapshot --rm-dist - deploy-to-bitrise-io@2: { } + setup_go_junit_report: + steps: + - script@1: + title: Setup JUnit XML converter + inputs: + - content: |- + #!/usr/bin/env bash + set -ex + go install github.com/jstemmer/go-junit-report/v2@latest + + setup_goreleaser: + steps: + - script@1: + inputs: + - content: |- + #!/bin/bash + set -ex + + if [ "$(uname)" = "Linux" ]; then + wget -O /tmp/goreleaser.deb https://github.com/goreleaser/goreleaser/releases/download/v1.19.2/goreleaser_1.19.2_amd64.deb + sudo dpkg -i /tmp/goreleaser.deb + else + go install github.com/goreleaser/goreleaser@latest + fi + meta: bitrise.io: machine_type_id: elite-xl From 1f070c9b00f258aa32684c1ee1650edc86625f56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Thu, 24 Oct 2024 14:52:52 +0200 Subject: [PATCH 37/45] Fix lint issue and go-junit-report installation --- bitrise.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bitrise.yml b/bitrise.yml index a2599dedd..f79fdaf62 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -133,7 +133,6 @@ workflows: goreleaser release - step_bundles: run_lint: steps: @@ -280,6 +279,9 @@ step_bundles: #!/usr/bin/env bash set -ex go install github.com/jstemmer/go-junit-report/v2@latest + if [ "$(uname)" == "Linux" ]; then + asdf reshim golang + fi setup_goreleaser: steps: From 36828aeb886116eaf188281607a573aedf5a24ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Thu, 24 Oct 2024 15:06:51 +0200 Subject: [PATCH 38/45] Fix asdf reshim --- bitrise.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitrise.yml b/bitrise.yml index f79fdaf62..9d6d2d3ee 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -279,7 +279,7 @@ step_bundles: #!/usr/bin/env bash set -ex go install github.com/jstemmer/go-junit-report/v2@latest - if [ "$(uname)" == "Linux" ]; then + if [ "$(uname)" == "Linux" ] && [asdf plugin-list | grep -q 'golang']; then asdf reshim golang fi From 1b9fd9fb12dc2762b2689fbaab21b22f92c752fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Thu, 24 Oct 2024 15:28:44 +0200 Subject: [PATCH 39/45] Fix asdf command --- bitrise.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitrise.yml b/bitrise.yml index 9d6d2d3ee..8eeff5626 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -279,7 +279,7 @@ step_bundles: #!/usr/bin/env bash set -ex go install github.com/jstemmer/go-junit-report/v2@latest - if [ "$(uname)" == "Linux" ] && [asdf plugin-list | grep -q 'golang']; then + if [ "$(uname)" == "Linux" ] && [asdf plugin list | grep -q 'golang']; then asdf reshim golang fi From 6eef161308c83de49c46d44627cf068a06b2923a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Thu, 24 Oct 2024 16:41:27 +0200 Subject: [PATCH 40/45] Fix asdf reshim --- bitrise.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitrise.yml b/bitrise.yml index 8eeff5626..e4479d936 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -279,7 +279,7 @@ step_bundles: #!/usr/bin/env bash set -ex go install github.com/jstemmer/go-junit-report/v2@latest - if [ "$(uname)" == "Linux" ] && [asdf plugin list | grep -q 'golang']; then + if [ "$(uname)" == "Linux" ] && command -v asdf >/dev/null && asdf plugin list | grep -q 'golang'; then asdf reshim golang fi From 9d3fafd53f6b2c0da38169d1a85ae239d2029322 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Thu, 24 Oct 2024 17:00:54 +0200 Subject: [PATCH 41/45] Separate run_docker_integration_tests --- bitrise.yml | 74 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 19 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index e4479d936..8fecbe7f8 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -25,6 +25,7 @@ stages: - run_unit_tests_linux: { } - run_integration_tests_macos: { } - run_integration_tests_linux: { } + - run_docker_integration_tests_linux: { } - test_binary_build_macos: { } - test_binary_build_linux: { } @@ -63,7 +64,16 @@ workflows: run_integration_tests_linux: steps: - bundle::setup_go_junit_report: { } - - bundle::run_integration_tests: + - bundle::run_integration_tests: {} + meta: + bitrise.io: + machine_type_id: elite-xl + stack: linux-docker-android-22.04 + + run_docker_integration_tests_linux: + steps: + - bundle::setup_go_junit_report: { } + - bundle::run_docker_integration_tests: envs: - SRC_DIR_IN_GOPATH: $BITRISE_SOURCE_DIR meta: @@ -214,8 +224,6 @@ step_bundles: if [ "$(uname)" = "Linux" ]; then test_name_json='{"test-name":"Integration tests (Linux)"}' test_log_file_name="integration_tests_linux" - linux_only_test_name_json='{"test-name":"Linux only integration tests"}' - linux_only_test_log_file_name="linux_only_integration_tests" else test_name_json='{"test-name":"Integration tests (macOS)"}' test_log_file_name="integration_tests_macos" @@ -223,35 +231,63 @@ step_bundles: # Run tests and generate report go test -v --tags linux_and_mac ./_tests/integration/... 2>&1 | tee "./${test_log_file_name}.log" - if [ "$(uname)" = "Linux" ]; then - go test -v --tags linux_only ./_tests/integration/... 2>&1 | tee "./${linux_only_test_log_file_name}.log" - fi mkdir -p "${ORIG_BITRISE_DEPLOY_DIR}" cp "./${test_log_file_name}.log" "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.log" - if [ "$(uname)" = "Linux" ]; then - cp "./${linux_only_test_log_file_name}.log" "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.log" - fi go-junit-report -in "./${test_log_file_name}.log" -out "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" - if [ "$(uname)" = "Linux" ]; then - go-junit-report -in "./${linux_only_test_log_file_name}.log" -out "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.xml" - fi # Export the junit test results test_results_dir="${ORIG_BITRISE_TEST_RESULT_DIR}/integration_test_results" mkdir -p "${test_results_dir}" cp "${ORIG_BITRISE_DEPLOY_DIR}/${test_log_file_name}.xml" "${test_results_dir}/${test_log_file_name}.xml" echo "${test_name_json}" > "${test_results_dir}/test-info.json" - - if [ "$(uname)" == "Linux" ]; then - test_results_dir="${ORIG_BITRISE_TEST_RESULT_DIR}/linux_only_integration_test_results" - mkdir -p "${test_results_dir}" - cp "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.xml" "${test_results_dir}/${linux_only_test_log_file_name}.xml" - echo "${linux_only_test_name_json}" > "${test_results_dir}/test-info.json" - fi - deploy-to-bitrise-io@2: { } + run_docker_integration_tests: + steps: + - git-clone@8: + inputs: + - fetch_tags: "yes" + - script@1: + title: Run integration tests and export results + inputs: + - content: |- + #!/usr/bin/env bash + set -exo pipefail + + # Here we save the original test results and deploy directories and later on we recreate them, + # because during the tests these directories are removed. + ORIG_BITRISE_TEST_RESULT_DIR="${BITRISE_TEST_RESULT_DIR}" + ORIG_BITRISE_DEPLOY_DIR="${BITRISE_DEPLOY_DIR}" + + # Build and setup the current binary + current_bitrise="$(pwd)/_tmp/test_bitrise" + export CGO_ENABLED=0 + go build -o "$current_bitrise" + + export PR="" PULL_REQUEST_ID="" + export INTEGRATION_TEST_BINARY_PATH="$current_bitrise" + $current_bitrise setup + + # Setup per OS test name and log file name + linux_only_test_name_json='{"test-name":"Linux only integration tests"}' + linux_only_test_log_file_name="linux_only_integration_tests" + + # Run tests and generate report + go test -v --tags linux_only ./_tests/integration/... 2>&1 | tee "./${linux_only_test_log_file_name}.log" + + mkdir -p "${ORIG_BITRISE_DEPLOY_DIR}" + cp "./${linux_only_test_log_file_name}.log" "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.log" + + go-junit-report -in "./${linux_only_test_log_file_name}.log" -out "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.xml" + + # Export the junit test results + test_results_dir="${ORIG_BITRISE_TEST_RESULT_DIR}/linux_only_integration_test_results" + mkdir -p "${test_results_dir}" + cp "${ORIG_BITRISE_DEPLOY_DIR}/${linux_only_test_log_file_name}.xml" "${test_results_dir}/${linux_only_test_log_file_name}.xml" + echo "${linux_only_test_name_json}" > "${test_results_dir}/test-info.json" + test_binary_build: steps: - git-clone@8: From 9554c2fe408a7d11f46bbf2895ffa2e6366b4597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Thu, 24 Oct 2024 17:08:12 +0200 Subject: [PATCH 42/45] Fix lint issue --- bitrise.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitrise.yml b/bitrise.yml index 8fecbe7f8..96a9a11f4 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -64,7 +64,7 @@ workflows: run_integration_tests_linux: steps: - bundle::setup_go_junit_report: { } - - bundle::run_integration_tests: {} + - bundle::run_integration_tests: { } meta: bitrise.io: machine_type_id: elite-xl From a5d9d7de72cea87080a73b1b57d824235d480481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Mon, 4 Nov 2024 10:30:53 +0100 Subject: [PATCH 43/45] Use latest xcode stack and simplify go-junit-report installation --- bitrise.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bitrise.yml b/bitrise.yml index 96a9a11f4..d7504fbea 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -58,7 +58,7 @@ workflows: - bundle::run_integration_tests: { } meta: bitrise.io: - stack: osx-xcode-16.0.x + stack: osx-xcode-latest machine_type_id: g2.mac.large run_integration_tests_linux: @@ -315,9 +315,7 @@ step_bundles: #!/usr/bin/env bash set -ex go install github.com/jstemmer/go-junit-report/v2@latest - if [ "$(uname)" == "Linux" ] && command -v asdf >/dev/null && asdf plugin list | grep -q 'golang'; then - asdf reshim golang - fi + asdf reshim golang || true setup_goreleaser: steps: From e346a9957aceaba8771d1d004a5ccf8719504a5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Tue, 5 Nov 2024 16:08:29 +0100 Subject: [PATCH 44/45] Restore local testing workflows --- bitrise.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/bitrise.yml b/bitrise.yml index d7504fbea..4441a80fb 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -143,6 +143,42 @@ workflows: goreleaser release + noop: + title: Noop + description: Empty workflow for quick testing + + fail-test: + title: Fails + description: Workflow will fail + steps: + - script: + title: Success + inputs: + - content: |- + set -ex + exit 0 + - script: + title: Fail wit exit code 2 + inputs: + - content: |- + set -ex + exit 2 + - script: + title: Skippable fail with exit code 2 + is_always_run: true + is_skippable: true + inputs: + - content: |- + set -ex + exit 2 + - script: + title: Skipping success + is_always_run: false + inputs: + - content: |- + set -ex + exit 0 + step_bundles: run_lint: steps: From 945ccd87391100cd63f2dedd5a6720dd3030794a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krisztia=CC=81n=20Go=CC=88drei?= Date: Wed, 13 Nov 2024 14:21:19 +0100 Subject: [PATCH 45/45] Fix os-xcode stack name --- bitrise.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitrise.yml b/bitrise.yml index 4441a80fb..5033fb454 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -58,7 +58,7 @@ workflows: - bundle::run_integration_tests: { } meta: bitrise.io: - stack: osx-xcode-latest + stack: osx-xcode-edge machine_type_id: g2.mac.large run_integration_tests_linux: