-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial backstop.json config and setup of action
- Loading branch information
1 parent
b0ec1a3
commit 42014cf
Showing
3 changed files
with
71 additions
and
25 deletions.
There are no files selected for viewing
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,22 @@ | ||
name: Delete closed PR multidevs | ||
name: VRT with Backstop JS | ||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
configure_env: | ||
name: Configure environment and Terminus | ||
install_node: | ||
name: Run BackstopJS | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
- name: Install Node 20 | ||
uses: actions/setup-node@v1 | ||
with: | ||
php-version: "8.2" | ||
- name: Install Terminus | ||
uses: pantheon-systems/terminus-github-actions@main | ||
with: | ||
pantheon-machine-token: ${{ secrets.TERMINUS_TOKEN }} | ||
node-version: 20.9 | ||
|
||
- name: Install Backstop | ||
run: npm install backstopjs | ||
|
||
|
||
|
||
remove_pr_env: | ||
runs-on: ubuntu-latest | ||
needs: [ configure_env ] | ||
if: github.event_name == 'pull_request' | ||
steps: | ||
- name: Install Terminus | ||
uses: pantheon-systems/terminus-github-actions@v1 | ||
with: | ||
pantheon-machine-token: ${{ secrets.TERMINUS_TOKEN }} | ||
|
||
- name: Determine target environment and maybe delete it | ||
run: | | ||
# Use the PR number as the environment name | ||
prnum="pr-${{ github.event.pull_request.number }}" | ||
terminus env:delete ${{ vars.SITE_NAME }}.$prnum --delete-branch --yes |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"id": "backstop_default", | ||
"viewports": [ | ||
{ | ||
"label": "phone", | ||
"width": 320, | ||
"height": 480 | ||
}, | ||
{ | ||
"label": "tablet", | ||
"width": 1024, | ||
"height": 768 | ||
}, | ||
{ | ||
"label": "desktop", | ||
"width": 1920, | ||
"height": 1080 | ||
} | ||
], | ||
"onBeforeScript": "puppet/onBefore.js", | ||
"onReadyScript": "puppet/onReady.js", | ||
"scenarios": [ | ||
{ | ||
"label": "Homepage", | ||
"cookiePath": "backstop_data/engine_scripts/cookies.json", | ||
"url": "https://dev-miriam-workflows-2.pantheonsite.io/", | ||
"referenceUrl": "", | ||
"readyEvent": "", | ||
"readySelector": "", | ||
"delay": 20, | ||
"hideSelectors": [], | ||
"removeSelectors": [], | ||
"hoverSelector": "", | ||
"clickSelector": "", | ||
"postInteractionWait": 0, | ||
"selectors": [], | ||
"selectorExpansion": true, | ||
"expect": 0, | ||
"misMatchThreshold" : 0.1, | ||
"requireSameDimensions": true | ||
} | ||
], | ||
"paths": { | ||
"bitmaps_reference": "backstop_data/bitmaps_reference", | ||
"bitmaps_test": "backstop_data/bitmaps_test", | ||
"engine_scripts": "backstop_data/engine_scripts", | ||
"html_report": "backstop_data/html_report", | ||
"ci_report": "backstop_data/ci_report" | ||
}, | ||
"report": ["browser"], | ||
"engine": "puppeteer", | ||
"engineOptions": { | ||
"args": ["--no-sandbox"] | ||
}, | ||
"asyncCaptureLimit": 5, | ||
"asyncCompareLimit": 50, | ||
"debug": false, | ||
"debugWindow": false | ||
} |