👷‍♂️ e2e: Add log check to e2e test

If the e2e test caused any exceptions or the like in the server we want
to know and fail.
This commit is contained in:
Gina Häußge committed 2023-02-02 10:56:27 +01:00
1 parent 5c942be033
commit 0b273c96aa
1 file changed
+18 -2
+18 -2
View File
@@ -162,20 +162,36 @@ jobs:
run: |
npx playwright install-deps
- name: 🚀 Run Playwright
- name: 🎭 Run Playwright
working-directory: ./tests/playwright
run: |
npx playwright test
env:
OCTOPRINT_SERVER_BASE: ${{ github.workspace }}/e2econfig
- name: ⬆ Upload report
- name: 🔎 Check octoprint.log for errors
run: |
log=${{ github.workspace }}/e2econfig/logs/octoprint.log
if grep "\- ERROR \-" $log; then
echo "::error::Errors were logged to octoprint.log"
grep -Pazo '(?m)^\N+\- ERROR \-\N*\n(^\N*?\n)*?(?=\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} \- )' $log
exit 1
fi
- name: ⬆ Upload Playwright report
uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: tests/playwright/playwright-report
- name: ⬆ Upload OctoPrint logs
uses: actions/upload-artifact@v3
if: fail()
with:
name: octoprint-logs
path: ${{ github.workspace }}/e2econfig/logs
publish-on-testpypi:
name: 📦 Publish on TestPyPI
if: github.event_name == 'release' && github.repository == 'OctoPrint/OctoPrint'