mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 16:25:00 +01:00
adds screenshot status with url, updates skill
This commit is contained in:
committed by
Henning Dieterichs
parent
234d552954
commit
89cd7ec4bb
12
.github/skills/update-screenshots/SKILL.md
vendored
12
.github/skills/update-screenshots/SKILL.md
vendored
@@ -38,17 +38,17 @@ Pick the most recent run that has a `screenshot-diff` artifact (runs where scree
|
||||
gh run download <run-id> --name screenshot-diff --dir .tmp/screenshot-diff
|
||||
```
|
||||
|
||||
This downloads:
|
||||
- `test/componentFixtures/.screenshots/current/` — the CI-captured screenshots
|
||||
- `test/componentFixtures/.screenshots/report.json` — structured diff report
|
||||
- `test/componentFixtures/.screenshots/report.md` — human-readable diff report
|
||||
The artifact is uploaded from two paths (`test/componentFixtures/.screenshots/current/` and `test/componentFixtures/.screenshots/report/`), but GitHub Actions strips the common prefix. So the downloaded structure is:
|
||||
- `current/` — the CI-captured screenshots (e.g. `current/baseUI/Buttons/Dark.png`)
|
||||
- `report/report.json` — structured diff report
|
||||
- `report/report.md` — human-readable diff report
|
||||
|
||||
### 3. Review the changes
|
||||
|
||||
Show the user what changed by reading the markdown report:
|
||||
|
||||
```bash
|
||||
cat .tmp/screenshot-diff/test/componentFixtures/.screenshots/report.md
|
||||
cat .tmp/screenshot-diff/report/report.md
|
||||
```
|
||||
|
||||
### 4. Copy CI screenshots to baseline
|
||||
@@ -56,7 +56,7 @@ cat .tmp/screenshot-diff/test/componentFixtures/.screenshots/report.md
|
||||
```bash
|
||||
# Remove old baselines and replace with CI screenshots
|
||||
rm -rf test/componentFixtures/.screenshots/baseline/
|
||||
cp -r .tmp/screenshot-diff/test/componentFixtures/.screenshots/current/ test/componentFixtures/.screenshots/baseline/
|
||||
cp -r .tmp/screenshot-diff/current/ test/componentFixtures/.screenshots/baseline/
|
||||
```
|
||||
|
||||
### 5. Clean up
|
||||
|
||||
7
.github/workflows/screenshot-test.yml
vendored
7
.github/workflows/screenshot-test.yml
vendored
@@ -12,6 +12,7 @@ permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
checks: write
|
||||
statuses: write
|
||||
|
||||
concurrency:
|
||||
group: screenshots-${{ github.event.pull_request.number || github.sha }}
|
||||
@@ -110,6 +111,12 @@ jobs:
|
||||
EOF
|
||||
fi
|
||||
|
||||
DETAILS_URL="https://hediet-ghartifactpreview.azurewebsites.net/${{ github.repository }}/run/${{ github.run_id }}/component-explorer/___explorer.html?report=./screenshot-report/report.json"
|
||||
gh api "repos/${{ github.repository }}/statuses/$SHA" \
|
||||
--input - <<EOF
|
||||
{"state":"success","target_url":"$DETAILS_URL","description":"$TITLE","context":"screenshots / explorer"}
|
||||
EOF
|
||||
|
||||
- name: Post summary
|
||||
run: |
|
||||
if [ -f test/componentFixtures/.screenshots/report/report.md ]; then
|
||||
|
||||
Reference in New Issue
Block a user