Skip to content

Commit

Permalink
Merge 3217ca8 into 775adbc
Browse files Browse the repository at this point in the history
  • Loading branch information
lychyi committed Mar 11, 2020
2 parents 775adbc + 3217ca8 commit f410af1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 211 deletions.
25 changes: 12 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ addons:
packages:
- libgconf-2-4

# cache both yarn and Cypress binar
# also cache TypeScript builds, this only rebuilds when code changes
# cache both yarn and Cypress binary
cache:
yarn: true
npm: false # Caching npm makes yarn install faster but downloading and packaging up the cache makes this slower when enabled
directories:
- ~/.cache

Expand All @@ -35,23 +34,23 @@ before_install:
- export PATH="$HOME/.yarn/bin:$PATH"

install:
- yarn install --production=false
- yarn install

jobs:
include:
- stage: pull_request
script:
- >-
yarn concurrently
"yarn lint"
"yarn depcheck"
"yarn test"
yarn run-p -l
lint
depcheck
test
- >- # Chromatic and Cypress rely on Storybook being built, this will exit early if build-storybook fails
yarn build-storybook &&
yarn http-server docs -p 9001 & yarn wait-on http://localhost:9001 &&
yarn concurrently
"yarn chromatic --quiet --exit-zero-on-changes --storybook-build-dir docs"
"yarn cypress run --record" &&
yarn http-server docs -p 9001 & npx wait-on http://localhost:9001 &&
yarn run-p -l
"chromatic -- --quiet --exit-zero-on-changes --exit-once-uploaded --storybook-build-dir docs"
"cypress:run -- --record" &&
kill $(jobs -p) || true
env:
# Travis doesn't support encryption on forks: https://docs.travis-ci.com/user/pull-requests#pull-requests-and-security-restrictions
Expand All @@ -74,7 +73,7 @@ jobs:
script:
- >- # Chromatic relies on a built Storybook, so exit early if build-storybook fails
yarn build-storybook &&
yarn chromatic --quiet --auto-accept-changes --storybook-build-dir docs
yarn chromatic --quiet --auto-accept-changes --exit-once-uploaded --storybook-build-dir docs
- yarn build
env:
- CHROMATIC_APP_CODE="dlpro96xybh"
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
"colors": "^1.4.0",
"commitizen": "^3.1.1",
"concurrently": "^5.1.0",
"core-js": "^3.5.0",
"css-loader": "^3.2.0",
"css-mqpacker": "^7.0.0",
Expand Down Expand Up @@ -123,8 +122,7 @@
"tslint": "^5.20.0",
"tslint-config-prettier": "^1.14.0",
"tslint-react": "^3.6.0",
"typescript": "^3.5.1",
"wait-on": "^4.0.1"
"typescript": "^3.5.1"
},
"scripts": {
"start": "node --max-old-space-size=2048 node_modules/.bin/start-storybook -p 9001 -c .storybook",
Expand All @@ -137,6 +135,7 @@
"create-module": "./utils/create-component/createComponent.js",
"create-component": "./utils/create-component/createComponent.js",
"precommit": "lint-staged",
"chromatic": "chromatic",
"commit": "git-cz",
"commitmsg": "commitlint --edit $HUSKY_GIT_PARAMS",
"build-storybook": "build-storybook -c .storybook -o docs",
Expand Down
Loading

0 comments on commit f410af1

Please sign in to comment.