-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82cc4a5
commit a5a503c
Showing
1 changed file
with
26 additions
and
14 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 |
---|---|---|
|
@@ -22,26 +22,38 @@ jobs: | |
run: npm install -g newman | ||
|
||
- name: Run Postman Collection with HTML Reporter | ||
run: newman run postman-api-tests.json -r cli, json --reporter-json-export result.json | ||
# run: newman run postman-api-tests.json -r cli, json --reporter-json-export result.json | ||
run: newman run qa_tests/Spartacus_Java_Boilerplate_Copy.postman_collection.json -r json --reporter-json-export=result.json --suppress-exit-code | ||
continue-on-error: true | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'adopt' | ||
java-version: '17' | ||
|
||
- name: Send parsed result to Hosted Application | ||
run: | | ||
export APP_URL=${{ secrets.APP_URL }} | ||
java -jar sendPostmanApiTestResults.jar newman-report.html result.json | ||
- name: Copy newman-report.html to server | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
source: "newman-report.html" | ||
target: "/home/${{ secrets.USERNAME }}/hng_boilerplate_java_web" | ||
# source: "newman-report.html" | ||
source: "result.json" | ||
target: "/home/${{ secrets.USERNAME }}/hng_boilerplate_java_web/staging-result" | ||
|
||
# - name: Set up Java | ||
# uses: actions/setup-java@v3 | ||
# with: | ||
# distribution: 'adopt' | ||
# java-version: '17' | ||
|
||
# - name: Send parsed result to Hosted Application | ||
# run: | | ||
# export APP_URL=${{ secrets.APP_URL }} | ||
# java -jar sendPostmanApiTestResults.jar newman-report.html result.json | ||
- name: Deploy to Server | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
script: | | ||
cd hng_boilerplate_java_web/staging-result | ||
java -jar sendPostmanApiTestResults.jar | ||