forked from OpenEVSE/openevse_esp32_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make a PDF and screenshot of the results
- Loading branch information
1 parent
3a6bd09
commit 7e64d5b
Showing
1 changed file
with
24 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 |
---|---|---|
|
@@ -89,10 +89,34 @@ jobs: | |
mkdir -p output | ||
pytest -v --color=yes --code-highlight yes --junitxml=output/test_results.xml | ||
- name: Start server to view test results | ||
uses: Eun/http-server-action@v1 | ||
with: | ||
directory: ${{ github.workspace }}/OpenEVSE_WiFi/divert_sim | ||
port: 8080 | ||
no-cache: false | ||
|
||
- name: Generate a PDF for the test results | ||
uses: misaelnieto/web_to_pdf_action@master | ||
with: | ||
webPageURL: http://localhost:8080/view.html | ||
outputFile: OpenEVSE_WiFi/divert_sim/${{ github.ref_name }}_test_results.pdf | ||
pdfOptions: '{"format": "A4", "margin": {"top": "10mm", "left": "10mm", "right": "10mm", "bottom": "10mm"}}' | ||
|
||
- name: Screenshot the test results webpage | ||
uses: swinton/[email protected] | ||
with: | ||
source: http://localhost:8080/view.html | ||
destination: ${{ github.ref_name }}_test_results.png | ||
full-page: true | ||
|
||
- name : Upload test results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test_results | ||
path: | | ||
${{ github.ref_name }}_test_results.pdf | ||
${{ github.ref_name }}_test_results.png | ||
OpenEVSE_WiFi/divert_sim/output | ||
OpenEVSE_WiFi/divert_sim/view.html |