Skip to content

Commit 7e64d5b

Browse files
committed
Make a PDF and screenshot of the results
1 parent 3a6bd09 commit 7e64d5b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/divert_sim.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,34 @@ jobs:
8989
mkdir -p output
9090
pytest -v --color=yes --code-highlight yes --junitxml=output/test_results.xml
9191
92+
93+
- name: Start server to view test results
94+
uses: Eun/http-server-action@v1
95+
with:
96+
directory: ${{ github.workspace }}/OpenEVSE_WiFi/divert_sim
97+
port: 8080
98+
no-cache: false
99+
100+
- name: Generate a PDF for the test results
101+
uses: misaelnieto/web_to_pdf_action@master
102+
with:
103+
webPageURL: http://localhost:8080/view.html
104+
outputFile: OpenEVSE_WiFi/divert_sim/${{ github.ref_name }}_test_results.pdf
105+
pdfOptions: '{"format": "A4", "margin": {"top": "10mm", "left": "10mm", "right": "10mm", "bottom": "10mm"}}'
106+
107+
- name: Screenshot the test results webpage
108+
uses: swinton/[email protected]
109+
with:
110+
source: http://localhost:8080/view.html
111+
destination: ${{ github.ref_name }}_test_results.png
112+
full-page: true
113+
92114
- name : Upload test results
93115
uses: actions/upload-artifact@v3
94116
with:
95117
name: test_results
96118
path: |
119+
${{ github.ref_name }}_test_results.pdf
120+
${{ github.ref_name }}_test_results.png
97121
OpenEVSE_WiFi/divert_sim/output
98122
OpenEVSE_WiFi/divert_sim/view.html

0 commit comments

Comments
 (0)