From 7d522ccce232aa993e19dd88c55398c875fb2eb1 Mon Sep 17 00:00:00 2001 From: Ninad Sheth Date: Tue, 5 Mar 2024 19:28:46 +0530 Subject: [PATCH] Fixed sca issues --- .github/workflows/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 40951b5..27caf9c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,6 +4,7 @@ on: workflow_dispatch: inputs: branch: + description: Used to set which branch of CLI to use for current run required: false type: string default: master @@ -40,16 +41,19 @@ jobs: - run: yarn - name: Set up @percy/cli from git if: ${{ github.event_name == 'workflow_dispatch' }} + env: + BRNACH: ${{ github.event.inputs.branch }} + WORKSPACE: ${{ github.workspace }} run: | cd /tmp - git clone --branch ${{ github.event.inputs.branch }} --depth 1 https://github.com/percy/cli + git clone --branch "$BRANCH" --depth 1 https://github.com/percy/cli cd cli PERCY_PACKAGES=`find packages -mindepth 1 -maxdepth 1 -type d | sed -e 's/packages/@percy/g' | tr '\n' ' '` git log -1 yarn yarn build yarn global:link - cd ${{ github.workspace }} + cd "$WORKSPACE" yarn remove @percy/cli && yarn link `echo $PERCY_PACKAGES` npx percy --version - run: yarn test:coverage