From f9a47d9a0af62aa29673ca14b1d9fd7e6119afaa Mon Sep 17 00:00:00 2001 From: Mateus Marquezini Date: Tue, 24 Mar 2020 09:38:06 -0300 Subject: [PATCH] Build and test only changed packages (#352) * #285 build and test only changed packages * changed since flag param * fix build cause --since lerna flag * fix build cause --since lerna flag * removed checkout option * fix build cause --since lerna flag * fix build cause --since lerna flag * fix build in progress * fix build in progress * removed --since flag for build executions * removed --since flag for build executions * changed action checkout step * added new ref to the action checkout * removed ref prop from the action checkout. Added new step to fetch branches to compare when using lerna --since * changed --since param value * added --since flag to the build and renamed the fetch step * removed --since flag from build. Added new config to the checkout step workflow * removed --since flag from yarn build. Added new config to the checkout step workflow * removed --since flag from yarn build. Added new step to checkout branch master * Added new step to checkout branch master --- .github/workflows/frontend.yml | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 2842442bf9..527639abf1 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -14,6 +14,8 @@ jobs: steps: - uses: actions/checkout@v2 + - name: fetch branch master + run: git fetch origin master - name: find location of yarn cache id: yarn-cache run: echo "::set-output name=dir::$(yarn cache dir)" diff --git a/package.json b/package.json index 75c1dd7474..7c6f997efb 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "start": "yarn build && yarn workspace @spotify-backstage/app start", "build": "lerna run build", - "test": "cross-env CI=true lerna run test -- --coverage", + "test": "cross-env CI=true lerna run test --since origin/master -- --coverage", "create-plugin": "backstage-cli create-plugin", "lint": "lerna run lint", "storybook": "yarn workspace @spotify-backstage/core storybook",