Skip to content

Commit aa885f5

Browse files
pftgclaude
andcommitted
docs: restructure README (970→159 lines) with docs/ folder
Extract advanced content to 7 focused docs/ files. Zero content removed. README: Quick Start → Installation → Configuration → Troubleshooting (moved from line 902 to 98) → Standalone API → Advanced Topics links. docs/: - configuration.md — all 17 config options - organization.md — groups, sections, cropping, multi-env - drivers.md — VIPS, ChunkyPNG, perceptual threshold - framework-setup.md — Minitest, RSpec, Cucumber - ci-integration.md — manual setup, reusable action, baseline updates - reporters.md — HTML report, custom reporters - docker-testing.md — bin/dtest, recording baselines Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d1a676b commit aa885f5

10 files changed

Lines changed: 1053 additions & 870 deletions

File tree

.github/actions/upload-screenshots/action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,25 @@ runs:
2020
name: ${{ inputs.name }}-diffs
2121
retention-days: ${{ inputs.retention-days }}
2222
path: test/fixtures/app/doc/screenshots/
23+
if-no-files-found: ignore
2324

2425
- name: Upload Capybara failure screenshots
2526
uses: actions/upload-artifact@v7
2627
with:
2728
name: ${{ inputs.name }}-capybara-fails
2829
retention-days: ${{ inputs.retention-days }}
2930
path: tmp/capybara/screenshots-diffs/
31+
if-no-files-found: ignore
3032

3133
- name: Check for HTML report
3234
id: check-report
3335
shell: bash
34-
run: test -f "${{ inputs.report-path }}/index.html" && echo "exists=true" >> "$GITHUB_OUTPUT" || echo "exists=false" >> "$GITHUB_OUTPUT"
36+
run: |
37+
if [ -f "${{ inputs.report-path }}/index.html" ]; then
38+
echo "exists=true" >> "$GITHUB_OUTPUT"
39+
else
40+
echo "exists=false" >> "$GITHUB_OUTPUT"
41+
fi
3542
3643
- name: Upload HTML report (inline preview)
3744
if: steps.check-report.outputs.exists == 'true'

.github/workflows/test.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ jobs:
8686
name: base-screenshots
8787

8888
- name: Find existing report comment
89-
if: failure() && github.event_name == 'pull_request'
89+
if: always() && github.event_name == 'pull_request'
9090
uses: peter-evans/find-comment@v3
9191
id: find-comment
9292
with:
9393
issue-number: ${{ github.event.pull_request.number }}
9494
comment-author: 'github-actions[bot]'
95-
body-includes: 'Screenshot diffs detected'
95+
body-includes: 'Screenshot diffs'
9696

9797
- name: Comment PR with report link
9898
if: failure() && github.event_name == 'pull_request'
@@ -104,9 +104,22 @@ jobs:
104104
body: |
105105
### Screenshot diffs detected
106106
107-
[View HTML report](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts) in Actions artifacts.
107+
| Artifact | Description |
108+
|----------|-------------|
109+
| [`base-screenshots-report`](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts) | Inline HTML report (click to view in browser) |
110+
| [`base-screenshots-report-full`](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts) | Full report with images (download for offline review) |
111+
| [`base-screenshots-diffs`](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts) | Raw screenshot diff files |
112+
113+
- name: Update comment on success
114+
if: success() && github.event_name == 'pull_request' && steps.find-comment.outputs.comment-id != ''
115+
uses: peter-evans/create-or-update-comment@v5
116+
with:
117+
comment-id: ${{ steps.find-comment.outputs.comment-id }}
118+
edit-mode: replace
119+
body: |
120+
### Screenshot diffs resolved
108121
109-
Click `base-screenshots-report` for inline preview, or download `base-screenshots-report-full` for images.
122+
All screenshots match their baselines. Previous diffs have been fixed.
110123
111124
- name: Uploading Coverage Report
112125
uses: actions/upload-artifact@v7

0 commit comments

Comments
 (0)