Files
Bubberstation/.github/workflows/compare_screenshots.yml
san7890andGitHub 34289bfce8 Standardizes all CI to run on ubuntu-24.04 (#94410)
## About The Pull Request

<img width="908" height="878" alt="image"
src="https://github.com/user-attachments/assets/7262576b-f7d9-4be4-8cff-6662f85698fd"
/>

Our application of Ubuntu 22.04 versus Ubuntu 24.04 (which is presently
the version for `ubuntu-latest`) is pretty inconsistent even within the
same suites, I figure we bump it up and set one standard moving
forwards. This PR was originally set to autoset it to `ubuntu-latest`
but wow the issues are agonizing so let's just bump it up and keep it
synchronized

also bumps python to `3.11.0` and whatever dependency versions needed
that as that was necessary
2025-12-13 20:36:10 -05:00

41 lines
1.5 KiB
YAML

name: Compare Screenshots
on:
workflow_call:
jobs:
compare_screenshots:
timeout-minutes: 15
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: Setup directory
run: mkdir -p artifacts
# If we ever add more artifacts, this is going to break, but it'll be obvious.
- name: Download screenshot tests
uses: actions/download-artifact@v7
with:
path: artifacts
- name: ls -R
run: ls -R artifacts
- name: Setup screenshot comparison
run: npm i
working-directory: tools/screenshot-test-comparison
- name: Run screenshot comparison
run: node tools/screenshot-test-comparison/index.js artifacts code/modules/unit_tests/screenshots artifacts/screenshot_comparisons
# workflow_run does not give you the PR it ran on,
# even through the thing literally named "matching pull requests".
# However, in GraphQL, you can check if the check suite was ran
# by a specific PR, so trusting the (user controlled) action here is okay,
# as long as we check it later in show_screenshot_test_results
- name: Save PR ID
if: failure() && github.event.pull_request
run: |
echo ${{ github.event.pull_request.number }} > artifacts/screenshot_comparisons/pull_request_number.txt
- name: Upload bad screenshots
if: failure()
uses: actions/upload-artifact@v6
with:
name: bad-screenshots
path: artifacts/screenshot_comparisons