Update dependency lint-staged to v15.2.11 #974
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Visual Tests | |
on: | |
pull_request: | |
types: [ opened, synchronize ] | |
env: | |
TEST_PATHS: "/ /career/yuya-yoshisue /brands/consumer-health-beauty /healthy-thinking/6-things-you-didnt-know-about-your-oral-health /brands /about/history /about/business-performance /about/structure /sustainability /careers /careers/career-opportunities /about/global-network /healthy-thinking /newsroom/world-dental-hygienist-awards-ceremony-australia" | |
TEST_PATHS_INDEXES: "/sidekick/library.json " | |
DOMAIN_MAIN: "main--sunstar--hlxsites.hlx.page" | |
DOMAIN_BRANCH: "${{github.head_ref}}--sunstar--hlxsites.hlx.page" | |
jobs: | |
compare-pages: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: .github/visual-tests | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm ci | |
- name: Generate path list | |
run: | | |
npm run collect-urls | |
cat generated-test-paths.txt | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps chromium | |
- name: Run Playwright tests | |
id: run-playwright-tests | |
run: ./run-and-create-github-summary.bash | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
path: .github/visual-tests/screenshots/* | |
name: screenshots | |
- name: Find Comment | |
uses: peter-evans/find-comment@v2 | |
id: find-comment | |
with: | |
issue-number: ${{ github.event.number }} | |
comment-author: 'github-actions[bot]' | |
body-regex: 'visual differences? detected' | |
- name: Delete comment if existing | |
if: steps.find-comment.outputs.comment-id != '' | |
uses: detomarco/delete-comment@main | |
id: delete-comment | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
- name: Comment on Pull Request | |
if: env.SUMMARY != '' | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
issue-number: ${{ github.event.number }} | |
body: ${{ env.SUMMARY }} | |