Skip to content

Commit

Permalink
run audit on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Feb 2, 2019
1 parent 3d3363c commit 67e76ab
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 14 deletions.
8 changes: 8 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ jobs:
paths:
- ~/.cache/yarn

- run: yarn audit-ci
- run: yarn lint-ci
- run: yarn test-ci

- run:
name: Prepublish the ui-lib and commit changes
command: yarn prepublish-ci
Expand Down Expand Up @@ -93,6 +97,10 @@ jobs:
paths:
- ~/.cache/yarn

- run: yarn audit-ci
- run: yarn lint-ci
- run: yarn test-ci

- run:
name: Prepublish the ui-lib to use it in "build-ci"
command: yarn prepublish-ci
Expand Down
2 changes: 2 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ steps:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0
- export PATH="$HOME/.yarn/bin:$PATH"
- yarn install
- yarn audit-ci
- yarn lint-ci
- yarn test-ci
- yarn prepublish-ci
Expand Down Expand Up @@ -74,6 +75,7 @@ steps:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0
- export PATH="$HOME/.yarn/bin:$PATH"
- yarn install
- yarn audit-ci
- yarn lint-ci
- yarn test-ci
- yarn prepublish-ci
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:

- stage: deploy-preview
name: Build a portal preview
script: yarn prepublish-ci && yarn build-ci
script: yarn audit-ci && yarn lint-ci && yarn test-ci && yarn prepublish-ci && yarn build-ci

- stage: deploy-release
name: Deploy portal and make eventually NPM release
script: yarn prepublish-ci && yarn build-ci && yarn deploy-ci && yarn publish-ci
script: yarn audit-ci && yarn lint-ci && yarn test-ci && yarn prepublish-ci && yarn build-ci && yarn deploy-ci && yarn publish-ci

stages:
- name: test
Expand Down
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@
],
"main": "./packages/dnb-ui-lib/index.js",
"scripts": {
"prepublish-ci": "cd ./packages/dnb-ui-lib && yarn prepublish-ci && cd -",
"precommit": "cd ./packages/dnb-ui-lib && yarn precommit && cd - && cd ./packages/dnb-design-system-portal && yarn precommit && cd -",
"build-ci": "cd ./packages/dnb-design-system-portal && yarn build-ci && cd -",
"deploy-ci": "cd ./packages/dnb-design-system-portal && yarn deploy-ci && cd -",
"start": "cd ./packages/dnb-design-system-portal && yarn start && cd -",
"lint-ci": "cd ./packages/dnb-ui-lib && yarn lint-ci && cd - && cd ./packages/dnb-design-system-portal && yarn lint-ci && cd -",
"publish-ci": "cd ./packages/dnb-ui-lib && yarn publish-ci && cd -",
"audit-ci": "yarn workspace dnb-ui-lib audit-ci",
"prepublish-ci": "yarn workspace dnb-ui-lib prepublish-ci",
"precommit": "yarn workspace dnb-ui-lib precommit && yarn workspace dnb-design-system-portal precommit",
"build-ci": "yarn workspace dnb-design-system-portal build-ci",
"deploy-ci": "yarn workspace dnb-design-system-portal deploy-ci",
"start": "yarn workspace dnb-design-system-portal start",
"lint-ci": "yarn workspace dnb-ui-lib lint-ci && yarn workspace dnb-design-system-portal lint-ci",
"publish-ci": "yarn workspace dnb-ui-lib publish-ci",
"reset": "rm -rf ./node_modules && rm yarn.lock && rm -rf ./packages/dnb-ui-lib/node_modules && rm -rf ./packages/dnb-design-system-portal/node_modules && yarn install",
"build": "cd ./packages/dnb-ui-lib && yarn build && cd - && cd ./packages/dnb-design-system-portal && yarn build && cd -",
"test": "cd ./packages/dnb-ui-lib && yarn test && cd -",
"test:update": "cd ./packages/dnb-ui-lib && yarn test:update && cd -",
"test-ci": "cd ./packages/dnb-ui-lib && yarn test-ci && cd - && cd ./packages/dnb-design-system-portal && yarn test-ci && cd -",
"build": "yarn workspace dnb-ui-lib build && yarn workspace dnb-design-system-portal build",
"test": "yarn workspace dnb-ui-lib test",
"test:update": "yarn workspace dnb-ui-lib test:update",
"test-ci": "yarn workspace dnb-ui-lib test-ci && yarn workspace dnb-design-system-portal test-ci",
"test-ci:update": "yarn test-ci --updateSnapshot"
},
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/dnb-ui-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"main": "index.js",
"scripts": {
"post-build": "yarn prettier:other",
"audit-ci": "audit-ci --high --package-manager=yarn",
"build": "yarn prepublish:local && yarn post-build",
"cdn": "live-server --no-browser --cors --port=8081",
"precommit": "yarn lint-staged",
Expand Down Expand Up @@ -92,6 +93,7 @@
"@storybook/addon-options": "^4.1.11",
"@storybook/react": "^4.1.11",
"@svgr/core": "^4.1.0",
"audit-ci": "^1.3.0",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"babel-loader": "^8.0.5",
Expand Down
11 changes: 10 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2875,6 +2875,15 @@ atob@^2.1.1:
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==

audit-ci@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/audit-ci/-/audit-ci-1.3.0.tgz#c255dcfe56c7cde555d07d7370aff826a3aa412d"
integrity sha512-NK+m2M8gV6ud0euq3vuFj6/o1IPTgu5TkLl+fUkuYmqBv4X4NZbPTbEqZpboWmWK6WKo+3nEN8E2f6VpuK1q8w==
dependencies:
cross-spawn "6.0.5"
semver "5.6.0"
yargs "12.0.2"

author-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/author-regex/-/author-regex-1.0.0.tgz#d08885be6b9bbf9439fe087c76287245f0a81450"
Expand Down Expand Up @@ -18697,7 +18706,7 @@ semver-truncate@^1.1.2:
dependencies:
semver "^5.3.0"

"semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", "[email protected] || 3.x || 4 || 5", "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
"semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", "[email protected] || 3.x || 4 || 5", [email protected], "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
Expand Down

0 comments on commit 67e76ab

Please sign in to comment.