Skip to content

Commit

Permalink
Use @percy/cli from github for regression (#716)
Browse files Browse the repository at this point in the history
* Use @percy/cli from github for regression

* fix missing
  • Loading branch information
samarsault committed Mar 21, 2023
1 parent 4c04ebb commit 2774582
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion .github/workflows/test.yml
@@ -1,5 +1,12 @@
name: Test
on: push
on:
push:
workflow_dispatch:
inputs:
branch:
required: false
type: string
default: master
jobs:
test:
name: Test
Expand All @@ -22,4 +29,18 @@ jobs:
key: v1/${{ runner.os }}/node-${{ matrix.node }}/${{ hashFiles('**/yarn.lock') }}
restore-keys: v1/${{ runner.os }}/node-${{ matrix.node }}/
- run: yarn
- name: Set up @percy/cli from git
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
cd /tmp
git clone --branch ${{ github.event.inputs.branch }} --depth 1 https://github.com/percy/cli
cd cli
PERCY_PACKAGES=`find packages -type d -depth 1 | sed -e 's/packages/@percy/g' | tr '\n' ' '`
git log -1
yarn
yarn build
yarn global:link
cd ${{ github.workspace }}
yarn remove @percy/cli && yarn link `echo $PERCY_PACKAGES`
npx percy --version
- run: yarn test

0 comments on commit 2774582

Please sign in to comment.