-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #362 from TheTosin/dev
Create run-postman-tests.yaml
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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/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 \ | ||
-H "Content-Type: multipart/form-data" \ | ||
-F "[email protected]" |