Skip to content

Percy manual TOOLS PAGE #161

Percy manual TOOLS PAGE

Percy manual TOOLS PAGE #161

name: Percy manual TOOLS PAGE
on:
workflow_dispatch:
inputs:
env:
description: "Env (prod,dev,stage,blue,green)"
type: string
percy_branch:
description: "Percy branch"
type: string
default: "manual"
percy_target_branch:
description: "Percy target branch"
type: string
default: "prod"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "cron"
percy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a single command using the runners shell
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: npm install
run: |
npm install
mkdir pixDiff && mkdir pixDiff/diff && mkdir pixDiff/baseline
- name: install chrome and chromedriver
env:
CHROME_VERSION: ${{vars.CHROME_VERSION}}
run: |
npm i chromedriver@`echo $CHROME_VERSION | sed 's/\..*//'` --no-save
wget "https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb"
sudo dpkg -i "google-chrome-stable_${CHROME_VERSION}_amd64.deb"
- name: VISUAL TESTS FOR TOOLS PAGE
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_TOOLS_PAGE }}
GOOGLE_SERVICE_ACCOUNT_EMAIL: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }}
GOOGLE_PRIVATE_KEY: ${{ secrets.GOOGLE_PRIVATE_KEY }}
SPREADSHEET_ID: ${{ secrets.SPREADSHEET_ID }}
PERCY_BRANCH: ${{ inputs.env || inputs.percy_branch }}
PERCY_TARGET_BRANCH: ${{ inputs.percy_target_branch }}
BASE_ENV: ${{ inputs.env }}
run: npm run percy:tools-page