diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index d2f668e955..37aa16deb3 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -48,12 +48,21 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} + - name: yarn install run: yarn install --frozen-lockfile - - run: yarn lint - - run: yarn build - - run: yarn test + + - name: lint + run: yarn lerna -- run lint --since origin/master + + - name: build + run: yarn build + + - name: test + run: yarn lerna -- run test --since origin/master -- --coverage + - name: yarn bundle, if app was changed - run: git diff --quiet origin/master HEAD -- packages/app packages/core || yarn bundle + run: git diff --quiet origin/master HEAD -- yarn.lock packages/app packages/core || yarn bundle + - name: verify storybook run: yarn workspace storybook build-storybook diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index ddce729bd8..6df9738bbc 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -47,16 +47,25 @@ jobs: with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ # Needed for auth + - name: yarn install run: yarn install --frozen-lockfile - - run: yarn lint - - run: yarn build - - run: yarn test + + - name: lint + run: yarn lerna -- run lint + + - name: build + run: yarn build + + - name: test + run: yarn lerna -- run test -- --coverage + # Publishes current version of packages that are not already present in the registry - name: publish - run: npx --no-install lerna publish from-package --yes + run: yarn lerna -- publish from-package --yes env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + # Tags the commit with the version in the core package if the tag doesn't exist - uses: Klemensas/action-autotag@1.2.3 with: diff --git a/package.json b/package.json index 1db293f059..c1c67c7e1d 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "create-plugin": "backstage-cli create-plugin", "release": "if [ \"$(git symbolic-ref --short HEAD)\" = master ]; then echo \"don't try to release master\"; exit 1; else lerna version --no-push; fi", "lint": "cross-env CI=true lerna run lint --since origin/master --", + "lerna": "lerna", "storybook": "yarn workspace storybook start" }, "workspaces": {