Merge pull request #445 from spotify/rugvip/ci-fixes
workflows: run lerna directly and fix master build + run build before tests locally
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
+6
-5
@@ -8,10 +8,11 @@
|
||||
"start": "yarn build && yarn workspace example-app start",
|
||||
"bundle": "yarn build && yarn workspace example-app bundle",
|
||||
"build": "lerna run build",
|
||||
"test": "cross-env CI=true lerna run test --since origin/master -- --coverage",
|
||||
"test": "yarn build && lerna run test --since origin/master -- --coverage",
|
||||
"lint": "lerna run lint --since origin/master --",
|
||||
"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": {
|
||||
@@ -44,8 +45,8 @@
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,ts,tsx}": [
|
||||
"prettier --config ./prettier.config.js --list-different --write"
|
||||
]
|
||||
"*.{js,jsx,ts,tsx}": [
|
||||
"prettier --config ./prettier.config.js --list-different --write"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user