From 61400859cf7902a91c0238e9d3825889e2f278d3 Mon Sep 17 00:00:00 2001 From: Adeshile Oluwatosin <105433596+TheTosin@users.noreply.github.com> Date: Fri, 23 Aug 2024 23:07:25 -0700 Subject: [PATCH 1/3] Create run-postman-tests.yaml Signed-off-by: Adeshile Oluwatosin <105433596+TheTosin@users.noreply.github.com> --- .github/workflows/run-postman-tests.yaml | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/run-postman-tests.yaml diff --git a/.github/workflows/run-postman-tests.yaml b/.github/workflows/run-postman-tests.yaml new file mode 100644 index 0000000..c7e82a3 --- /dev/null +++ b/.github/workflows/run-postman-tests.yaml @@ -0,0 +1,33 @@ +name: Run Postman Tests Every 15 Minutes + +on: + workflow_dispatch: + schedule: + - cron: '*/15 * * * *' # Every 15 minutes + +jobs: + run-postman-tests: + runs-on: self-hosted + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install Newman + run: npm install -g newman + + - name: Run Newman tests + id: newman + run: | + newman run status/postman/telex_postmancollection_v1.json --reporters cli,json --reporter-json-export report.json + + - name: Send API Status + run: | + curl -X POST "${{ vars.API_URL }}/api/v1/api-status" \ + -H "Content-Type: application/json" \ + -d @report.json From 0232f0242fa438f7a882ff790a2487fb4e17293d Mon Sep 17 00:00:00 2001 From: Adeshile Oluwatosin <105433596+TheTosin@users.noreply.github.com> Date: Fri, 23 Aug 2024 23:17:14 -0700 Subject: [PATCH 2/3] Update run-postman-tests.yaml Signed-off-by: Adeshile Oluwatosin <105433596+TheTosin@users.noreply.github.com> --- .github/workflows/run-postman-tests.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-postman-tests.yaml b/.github/workflows/run-postman-tests.yaml index c7e82a3..b711c59 100644 --- a/.github/workflows/run-postman-tests.yaml +++ b/.github/workflows/run-postman-tests.yaml @@ -26,8 +26,8 @@ jobs: run: | newman run status/postman/telex_postmancollection_v1.json --reporters cli,json --reporter-json-export report.json - - name: Send API Status + - name: Upload Newman Report to API run: | - curl -X POST "${{ vars.API_URL }}/api/v1/api-status" \ - -H "Content-Type: application/json" \ - -d @report.json + curl -X POST ${{ vars.API_URL }}/api/v1/api-status \ + -H "Content-Type: multipart/form-data" \ + -F "result_file=@report.json" From aaf70491f67081a5d84a410fbcb8f2364f15602e Mon Sep 17 00:00:00 2001 From: Adeshile Oluwatosin <105433596+TheTosin@users.noreply.github.com> Date: Sat, 24 Aug 2024 01:32:05 -0700 Subject: [PATCH 3/3] Update run-postman-tests.yaml Signed-off-by: Adeshile Oluwatosin <105433596+TheTosin@users.noreply.github.com> --- .github/workflows/run-postman-tests.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/run-postman-tests.yaml b/.github/workflows/run-postman-tests.yaml index b711c59..ee9de13 100644 --- a/.github/workflows/run-postman-tests.yaml +++ b/.github/workflows/run-postman-tests.yaml @@ -24,8 +24,7 @@ jobs: - name: Run Newman tests id: newman run: | - newman run status/postman/telex_postmancollection_v1.json --reporters cli,json --reporter-json-export report.json - + newman run status/postman/KimikoGolangSwagger.postman_collection.json --reporters cli,json --reporter-json-export report.json - name: Upload Newman Report to API run: | curl -X POST ${{ vars.API_URL }}/api/v1/api-status \