diff --git a/.github/workflows/perf-test.yml b/.github/workflows/perf-test.yml index dbc92b685d..fd287853af 100644 --- a/.github/workflows/perf-test.yml +++ b/.github/workflows/perf-test.yml @@ -108,14 +108,7 @@ jobs: SMOKE_TEST_SUFFIX: ${{ github.run_id }} MOCK_PORT_API: ${{ inputs.mock_port_api && '1' || '0' }} run: | - if [[ "${MOCK_PORT_API}" = "1" ]]; then - make smoke/start-mock-api - make smoke/clean - make smoke/stop-mock-api - else - make smoke/clean - fi - + ./scripts/clean-smoke-test.sh - name: Publish Performance Test Summary run: | cat ./perf-test-results-${{ github.run_id }}.log.md >> ${GITHUB_STEP_SUMMARY} diff --git a/scripts/clean-smoke-test.sh b/scripts/clean-smoke-test.sh new file mode 100755 index 0000000000..44b81b74d0 --- /dev/null +++ b/scripts/clean-smoke-test.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +SCRIPT_BASE="$(cd -P "$(dirname "$0")" && pwd)" +ROOT_DIR="$(cd -P "${SCRIPT_BASE}/../" && pwd)" + + +cd "${ROOT_DIR}" || exit 1 + +if [[ "${MOCK_PORT_API}" = "1" ]]; then + make smoke/start-mock-api + make smoke/clean + make smoke/stop-mock-api +else + make smoke/clean +fi