From 12e1a931d1ac331bcc90bb8b24bd6137987c4a87 Mon Sep 17 00:00:00 2001 From: Naveen Date: Thu, 26 Oct 2023 09:32:39 +0530 Subject: [PATCH] updated workflow to genearte Test report and save in github --- .github/workflows/main.yml | 11 +++++++++-- reports/report.html | 16 ++++++++-------- .../test_users.cpython-310-pytest-7.4.3.pyc | Bin 7516 -> 7568 bytes tests/test_users.py | 5 ++++- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0e07e0e..9bf8ef3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,6 +33,13 @@ jobs: pip install -r requirements.txt working-directory: ${{ github.workspace }} - - name: Run tests - run: pytest -v tests/test_users.py + - name: Run tests and generate report + run: | + pytest -v tests/test_users.py --html=report.html working-directory: ${{ github.workspace }} + + - name: Save test report as artifact + uses: actions/upload-artifact@v2 + with: + name: test-report + path: report.html diff --git a/reports/report.html b/reports/report.html index 35e403b..eaf440b 100644 --- a/reports/report.html +++ b/reports/report.html @@ -7,7 +7,7 @@

report.html

-

Report generated on 26-Oct-2023 at 01:25:39 by pytest-html +

Report generated on 26-Oct-2023 at 09:32:00 by pytest-html v4.0.2

Environment

@@ -61,7 +61,7 @@

Environment

Summary

-

11 tests took 00:00:11.

+

8 tests took 00:00:04.

(Un)check the boxes to filter the results.