From ff7b41706519e4644e2fa776a8f907380e62aa60 Mon Sep 17 00:00:00 2001 From: FleetAdmiralButter Date: Thu, 21 Sep 2023 16:56:13 +1000 Subject: [PATCH] custom newman tests --- .github/workflows/api.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index 3287cfb..85324f5 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -63,4 +63,17 @@ jobs: else echo "==> No Postman API test collection is found. Skip the test." fi - \ No newline at end of file + - name: Run custom Newman API tests + if: always() + run: | + if [ -e tests/newman/custom.collection.json ] + then + case ${GITHUB_REF_NAME} in + standby|production) + newman run tests/newman/custom.collection.json --folder default -e tests/newman/tide.environment.json --env-var "host=${BE_BASE_URL}" --env-var "branch=${GITHUB_REF_NAME}" --color on -r htmlextra --reporter-htmlextra-export ./report/custom.collection.report.html;; + *) + newman run tests/newman/custom.collection.json -e tests/newman/tide.environment.json --env-var "host=${BE_BASE_URL}" --env-var "branch=${GITHUB_REF_NAME}" --color on -r htmlextra --reporter-htmlextra-export ./report/custom.collection.report.html;; + esac + else + echo "==> No Postman API test collection is found. Skip the test." + fi