diff --git a/bitrise.yml b/bitrise.yml index 7132a837..9aa300ce 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -34,10 +34,12 @@ stages: workflows: run_lint: steps: + - bundle::setup_repo: {} - bundle::run_lint: { } run_unit_tests_macos: steps: + - bundle::setup_repo: {} - bundle::setup_go_junit_report: { } - bundle::run_unit_tests: { } meta: @@ -47,11 +49,13 @@ workflows: run_unit_tests_linux: steps: + - bundle::setup_repo: {} - bundle::setup_go_junit_report: { } - bundle::run_unit_tests: { } run_integration_tests_macos: steps: + - bundle::setup_repo: {} - bundle::setup_go_junit_report: { } - bundle::run_integration_tests: { } meta: @@ -61,11 +65,13 @@ workflows: run_integration_tests_linux: steps: + - bundle::setup_repo: {} - bundle::setup_go_junit_report: { } - bundle::run_integration_tests: { } run_docker_integration_tests_linux: steps: + - bundle::setup_repo: {} - bundle::setup_go_junit_report: { } - bundle::run_docker_integration_tests: envs: @@ -77,6 +83,7 @@ workflows: test_binary_build_macos: steps: + - bundle::setup_repo: {} - bundle::setup_goreleaser: { } - bundle::test_binary_build: { } meta: @@ -86,6 +93,7 @@ workflows: test_binary_build_linux: steps: + - bundle::setup_repo: {} - bundle::setup_goreleaser: { } - bundle::test_binary_build: { } @@ -168,13 +176,6 @@ workflows: step_bundles: run_lint: steps: - - git-clone@8: - inputs: - - fetch_tags: "yes" - - script: - title: Setup Go version - inputs: - - content: asdf install golang - git::https://github.com/bitrise-steplib/steps-check.git: inputs: - workflow: lint @@ -183,9 +184,6 @@ step_bundles: run_unit_tests: steps: - - git-clone@8: - inputs: - - fetch_tags: "yes" - script@1: title: Run unit tests inputs: @@ -193,8 +191,6 @@ step_bundles: #!/usr/bin/env bash set -ex - asdf install golang # version defined in .tool-versions - # 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}" @@ -224,9 +220,6 @@ step_bundles: run_integration_tests: steps: - - git-clone@8: - inputs: - - fetch_tags: "yes" - script@1: title: Run integration tests inputs: @@ -234,8 +227,6 @@ step_bundles: #!/usr/bin/env bash set -exo pipefail - asdf install golang # version defined in .tool-versions - # 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}" @@ -276,9 +267,6 @@ step_bundles: run_docker_integration_tests: steps: - - git-clone@8: - inputs: - - fetch_tags: "yes" - script@1: title: Run integration tests inputs: @@ -286,9 +274,6 @@ step_bundles: #!/usr/bin/env bash set -exo pipefail - asdf plugin add golang || true # TODO: can be removed once workflow is migrated to Ubuntu 22 - asdf install golang # version defined in .tool-versions - # 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}" @@ -324,9 +309,6 @@ step_bundles: test_binary_build: steps: - - git-clone@8: - inputs: - - fetch_tags: "yes" - script@1: title: Create snapshot binaries deps: @@ -340,6 +322,21 @@ step_bundles: goreleaser release --snapshot --rm-dist - deploy-to-bitrise-io@2: { } + setup_repo: + steps: + - git-clone@8: + inputs: + - fetch_tags: "yes" + - script: + title: Setup Go version + inputs: + - content: |- + #!/bin/bash + set -ex + + asdf plugin add golang || true # TODO: can be removed once all workflows are migrated to Ubuntu 22 + asdf install golang + setup_go_junit_report: steps: - script@1: @@ -348,9 +345,8 @@ step_bundles: - content: |- #!/usr/bin/env bash set -ex - asdf install golang # version defined in .tool-versions go install github.com/jstemmer/go-junit-report/v2@latest - asdf reshim golang || true + asdf reshim golang setup_goreleaser: steps: @@ -360,7 +356,6 @@ step_bundles: #!/bin/bash set -ex - asdf install golang # version defined in .tool-versions 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