From ebcca83eb819b5eede1b2a86f527834b763dbbe2 Mon Sep 17 00:00:00 2001 From: Calileus <79671075+Calileus@users.noreply.github.com> Date: Tue, 27 Oct 2026 09:09:28 -0600 Subject: [PATCH 1/2] Improving .github/workflows/tests.yml --- .github/workflows/tests.yml | 70 +++++++++++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e75a653..2ae5058 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,26 +1,68 @@ -name: UI tests +name: Playwright QA Automation on: push: + branches: [ "main", "master" ] pull_request: + branches: [ "main", "master" ] + workflow_dispatch: jobs: - pytest: + test: + name: UI Tests (Chromium) runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 with: python-version: "3.10" - cache: pip - - run: python -m pip install -r pyenv/requirements.txt - - run: python -m playwright install --with-deps chromium - - name: Run UI tests - run: mkdir -p reports && python -m pytest --html=reports/report.html --self-contained-html --junitxml=reports/junit.xml - - if: always() + cache: "pip" + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r pyenv/requirements.txt + + - name: Install Playwright Browsers + run: python -m playwright install --with-deps chromium + + - name: Create Reports Directory + run: mkdir -p reports + + - name: Run Pytest Suite with Reports + run: | + python -m pytest \ + --html=reports/report.html \ + --self-contained-html \ + --junitxml=reports/junit.xml \ + -v + env: + CI: "true" + + - name: Upload Test Reports & HTML Dashboard + if: always() uses: actions/upload-artifact@v4 with: - name: test-reports-and-failures - path: | - reports/ - test-results/ + name: playwright-html-report + path: reports/ + retention-days: 30 + + - name: Upload Playwright Failure Traces & Screenshots + if: failure() + uses: actions/upload-artifact@v4 + with: + name: playwright-failure-artifacts + path: test-results/ + retention-days: 30 + + - name: Publish Test Summary + if: always() + run: | + if [ -f reports/junit.xml ]; then + echo "### Test Results Summary" >> $GITHUB_STEP_SUMMARY + echo "JUnit report generated successfully at `reports/junit.xml`." >> $GITHUB_STEP_SUMMARY + fi From 99f1cb4b978ebac6e20610118514519706a402bf Mon Sep 17 00:00:00 2001 From: Calileus <79671075+Calileus@users.noreply.github.com> Date: Tue, 27 Oct 2026 09:21:56 -0600 Subject: [PATCH 2/2] Fixing wrong nesting in Publish Test Summary action --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2ae5058..52a3bcb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -62,7 +62,7 @@ jobs: - name: Publish Test Summary if: always() run: | + echo "### Test Results Summary" >> $GITHUB_STEP_SUMMARY if [ -f reports/junit.xml ]; then - echo "### Test Results Summary" >> $GITHUB_STEP_SUMMARY - echo "JUnit report generated successfully at `reports/junit.xml`." >> $GITHUB_STEP_SUMMARY + echo "JUnit report generated successfully at \`reports/junit.xml\`." >> $GITHUB_STEP_SUMMARY fi