Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 80 additions & 5 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,85 @@ jobs:
path: flowchart.png

#---------------------------------------------------
# 11 – Sticky PR comment
# 11 – Checklist generation
#---------------------------------------------------
- name: Build dynamic checklist
id: checklist
shell: bash
run: |
CHECKLIST=""
WARNING=false

# GitHub Action triggered
CHECKLIST="${CHECKLIST}- [x] GitHub Action triggered\n"

# Playwright tests completed successfully
if [[ "${{ steps.summary.outputs.total }}" != "" ]]; then
CHECKLIST="${CHECKLIST}- [x] Playwright tests completed successfully\n"
else
CHECKLIST="${CHECKLIST}- [ ] Playwright tests completed successfully\n"
WARNING=true
fi

# ESLint executed without issues
if [[ -f eslint-tests.json ]]; then
CHECKLIST="${CHECKLIST}- [x] ESLint executed without issues\n"
else
CHECKLIST="${CHECKLIST}- [ ] ESLint executed without issues\n"
WARNING=true
fi

# Prettier check completed
if [[ -f prettier.patch ]]; then
CHECKLIST="${CHECKLIST}- [x] Prettier check completed\n"
else
CHECKLIST="${CHECKLIST}- [ ] Prettier check completed\n"
WARNING=true
fi

# Test summary generated
if [[ "${{ steps.summary.outputs.total }}" != "" ]]; then
CHECKLIST="${CHECKLIST}- [x] Test summary generated\n"
else
CHECKLIST="${CHECKLIST}- [ ] Test summary generated\n"
WARNING=true
fi

# Flowchart created
if [[ -f flowchart.png ]]; then
CHECKLIST="${CHECKLIST}- [x] Flowchart created\n"
else
CHECKLIST="${CHECKLIST}- [ ] Flowchart created\n"
WARNING=true
fi

echo -e "value<<EOF" >> $GITHUB_OUTPUT
echo -e "$CHECKLIST" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

if [[ "$WARNING" == "true" ]]; then
echo "status=warning" >> $GITHUB_OUTPUT
else
echo "status=success" >> $GITHUB_OUTPUT
fi



#---------------------------------------------------
# 12 – Sticky PR comment
#---------------------------------------------------
- name: Comment on PR with results
uses: marocchino/sticky-pull-request-comment@v2
with:
message: |
## Playwright Test Metrics
### Test Checklist
${{ steps.checklist.outputs.value }}

Checklist Status: ${{ steps.checklist.outputs.status }}

---

### Playwright Test Metrics
*Total:* **${{ steps.summary.outputs.total }}**
*Passed:* **${{ steps.summary.outputs.passed }}**
*Failed:* **${{ steps.summary.outputs.failed }}**
Expand All @@ -232,8 +304,9 @@ jobs:
*Duration:* **${{ steps.summary.outputs.duration }} ms**
*Pass Rate:* **${{ steps.summary.outputs.passrate }} %**


## ESLint Test Metrics
---

### ESLint Test Metrics
*Files Checked:* **${{ steps.eslint_summary.outputs.total_files }}**
*Errors:* **${{ steps.eslint_summary.outputs.errors }}**
*Warnings:* **${{ steps.eslint_summary.outputs.warnings }}**
Expand All @@ -243,7 +316,9 @@ jobs:
${{ steps.lint_summary.outputs.summary }}
```

## Test-Flow Chart
---

### Test-Flow Chart
Artifact: **test-flow-chart → flowchart.png**

_Full run details:_ [link](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
2 changes: 1 addition & 1 deletion playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = defineConfig({
ignoreHTTPSErrors: true,
},
reporter: [
['json', { outputFile: 'metrics.json' }],
['json', { outputFile: 'playwright-metrics.json' }],
['html', { outputFile: 'report.html', open: 'never' }],
Comment on lines +13 to 14
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

Suggested change
['json', { outputFile: 'playwright-metrics.json' }],
['html', { outputFile: 'report.html', open: 'never' }],
["json", { outputFile: "playwright-metrics.json" }],
["html", { outputFile: "report.html", open: "never" }],

],
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[prettier] reported by reviewdog 🐶

Suggested change
});
});

Loading