diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22e70d7..9ca8900 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -53,7 +53,14 @@ jobs: yarn yarn build yarn global:link + # Expose the freshly built `percy` on PATH. yarn link symlinks the + # package but not its bin, so `npx percy` would miss it and download + # the unrelated public `percy`. Link is best-effort; PATH is what + # makes percy resolvable. + echo "$(yarn global bin)" >> "$GITHUB_PATH" + export PATH="$(yarn global bin):$PATH" cd "$WORKSPACE" - yarn remove @percy/cli && yarn link `echo $PERCY_PACKAGES` - npx percy --version + yarn remove @percy/cli >/dev/null 2>&1 || true + yarn link `echo $PERCY_PACKAGES` >/dev/null 2>&1 || true + percy --version - run: yarn test:coverage