Update visual regression tests #76
Workflow file for this run
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: Update visual regression tests | |
on: [workflow_dispatch] | |
jobs: | |
build: | |
name: Update Visual Regression Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install Dependencies | |
run: | | |
npm install -g backstopjs --unsafe-perm=true --allow-root | |
npm ci | |
- name: Generate new reference screenshots | |
run: | | |
nohup npm run larva > /dev/null 2>&1 & | |
sleep 5 | |
npm run backstop -- reference | |
env: | |
CI: true | |
- name: Set new branch name | |
run: | | |
echo ::set-output name=NEW_BRANCH::"$GITHUB_REF_NAME--update-backstop-reference" | |
id: set-output-new-branch | |
- name: Commit results | |
uses: EndBug/add-and-commit@v8 | |
with: | |
add: 'backstop_data' | |
message: 'chore: updated backstop reference screenshots' | |
new_branch: ${{ steps.set-output-new-branch.outputs.NEW_BRANCH }} |