chore: add travis, refactor test scripts
This commit is contained in:
parent
0a97887696
commit
fabe76a621
@ -5,9 +5,13 @@ cache:
|
|||||||
- $HOME/.npm
|
- $HOME/.npm
|
||||||
- $HOME/.yarn-cache
|
- $HOME/.yarn-cache
|
||||||
- node_modules
|
- node_modules
|
||||||
|
- ~/.cache
|
||||||
node_js:
|
node_js:
|
||||||
- '8'
|
- '8'
|
||||||
- '10'
|
- '10'
|
||||||
|
env:
|
||||||
|
- TEST_SUITE="test:unit"
|
||||||
|
- TEST_SUITE="test:e2e:ci"
|
||||||
install:
|
install:
|
||||||
- yarn bootstrap
|
- yarn bootstrap
|
||||||
script:
|
script:
|
||||||
|
47
package.json
47
package.json
@ -8,24 +8,30 @@
|
|||||||
"build:esm": "lerna run build:esm",
|
"build:esm": "lerna run build:esm",
|
||||||
"build-preview": "run-s build build-preview:lerna",
|
"build-preview": "run-s build build-preview:lerna",
|
||||||
"build-preview:lerna": "lerna run build-preview",
|
"build-preview:lerna": "lerna run build-preview",
|
||||||
|
"build:demo": "run-s build build:demo:copy",
|
||||||
|
"build:demo:copy": "ncp packages/netlify-cms/dist dev-test/",
|
||||||
"clean": "rimraf packages/*/dist dev-test/dist",
|
"clean": "rimraf packages/*/dist dev-test/dist",
|
||||||
"clean:lerna": "lerna clean --yes",
|
"clean:lerna": "lerna clean --yes",
|
||||||
"reset": "run-s clean clean:lerna",
|
"reset": "run-s clean clean:lerna",
|
||||||
"cache-ci": "node scripts/cache.js",
|
"test": "run-s clean lint test:unit test:e2e",
|
||||||
"test": "run-s clean lint jest e2e",
|
"test-ci": "run-s clean lint-quiet test:unit test:e2e:ci",
|
||||||
"test-ci": "run-s clean lint-quiet cache-ci jest e2e-ci",
|
"test:unit": "cross-env NODE_ENV=test jest --no-cache",
|
||||||
"jest": "cross-env NODE_ENV=test jest --no-cache",
|
"test:e2e": "run-s build:demo test:e2e:run",
|
||||||
"e2e-prep": "run-s build e2e-move-build",
|
"test:e2e:ci": "run-s build:demo test:e2e:run-ci",
|
||||||
"e2e-move-build": "cp -r packages/netlify-cms/dist dev-test/",
|
"test:e2e:dev": "start-test develop 8080 test:e2e:exec-dev",
|
||||||
"e2e-serve": "http-server dev-test",
|
"test:e2e:serve": "http-server dev-test",
|
||||||
"e2e-exec": "cypress run",
|
"test:e2e:exec": "cypress run",
|
||||||
"e2e-exec-ci": "cypress run --record",
|
"test:e2e:exec-ci": "cypress run --record",
|
||||||
"e2e-exec-dev": "cypress open",
|
"test:e2e:exec-dev": "cypress open",
|
||||||
"e2e-run": "start-test e2e-serve 8080 e2e-exec",
|
"test:e2e:run": "start-test test:e2e:serve 8080 test:e2e:exec",
|
||||||
"e2e-run-ci": "start-test e2e-serve 8080 e2e-exec-ci",
|
"test:e2e:run-ci": "start-test test:e2e:serve 8080 test:e2e:exec-ci",
|
||||||
"e2e": "run-s e2e-prep e2e-run",
|
"lint": "run-p -c --aggregate-output lint:*",
|
||||||
"e2e-ci": "run-s e2e-prep e2e-run-ci",
|
"lint-quiet": "run-p -c --aggregate-output \"lint:* -- --quiet\"",
|
||||||
"e2e-dev": "start-test develop 8080 e2e-exec-dev",
|
"lint:css": "stylelint --ignore-path .gitignore \"{packages/**/*.{css,js},website/**/*.css}\"",
|
||||||
|
"lint:js": "eslint --color --ignore-path .gitignore \"{{packages,scripts,website}/**/,}*.js\"",
|
||||||
|
"lint:format": "prettier \"{{packages,scripts,website}/**/,}*.{js,css}\" --list-different",
|
||||||
|
"format": "run-s \"lint:css -- --fix --quiet\" \"lint:js -- --fix --quiet\" \"format:prettier -- --write\"",
|
||||||
|
"format:prettier": "prettier \"{{packages,scripts,website}/**/,}*.{js,css}\"",
|
||||||
"publish": "run-s publish:before-manual-version publish:after-manual-version",
|
"publish": "run-s publish:before-manual-version publish:after-manual-version",
|
||||||
"publish:ci": "run-s publish:prepare \"publish:version --yes\" build publish:push-git \"publish:from-git --yes\"",
|
"publish:ci": "run-s publish:prepare \"publish:version --yes\" build publish:push-git \"publish:from-git --yes\"",
|
||||||
"publish:before-manual-version": "run-s publish:prepare publish:version",
|
"publish:before-manual-version": "run-s publish:prepare publish:version",
|
||||||
@ -45,15 +51,7 @@
|
|||||||
"publish:graduate:ci": "run-s publish:prepare \"publish:version --conventional-graduate --yes\" build publish:push-git \"publish:from-git --yes\"",
|
"publish:graduate:ci": "run-s publish:prepare \"publish:version --conventional-graduate --yes\" build publish:push-git \"publish:from-git --yes\"",
|
||||||
"publish:graduate:before-manual-version": "run-s publish:prepare publish:graduate:version",
|
"publish:graduate:before-manual-version": "run-s publish:prepare publish:graduate:version",
|
||||||
"publish:graduate:version": "run-s \"publish:version --conventional-graduate\"",
|
"publish:graduate:version": "run-s \"publish:version --conventional-graduate\"",
|
||||||
"publish:graduate:dry-run": "run-s \"publish:version --conventional-graduate --no-git-tag-version\"",
|
"publish:graduate:dry-run": "run-s \"publish:version --conventional-graduate --no-git-tag-version\""
|
||||||
"format": "run-s \"lint:css -- --fix --quiet\" \"lint:js -- --fix --quiet\" \"format:prettier -- --write\"",
|
|
||||||
"format:prettier": "prettier \"{{packages,scripts,website}/**/,}*.{js,css}\"",
|
|
||||||
"lint": "run-p -c --aggregate-output lint:*",
|
|
||||||
"lint-quiet": "run-p -c --aggregate-output \"lint:* -- --quiet\"",
|
|
||||||
"lint:css": "stylelint --ignore-path .gitignore \"{packages/**/*.{css,js},website/**/*.css}\"",
|
|
||||||
"lint:js": "eslint --color --ignore-path .gitignore \"{{packages,scripts,website}/**/,}*.js\"",
|
|
||||||
"lint:format": "prettier \"{{packages,scripts,website}/**/,}*.{js,css}\" --list-different",
|
|
||||||
"add-contributor": "all-contributors add"
|
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"last 2 Chrome versions",
|
"last 2 Chrome versions",
|
||||||
@ -100,6 +98,7 @@
|
|||||||
"jest-cli": "^24.5.0",
|
"jest-cli": "^24.5.0",
|
||||||
"jest-dom": "^3.1.3",
|
"jest-dom": "^3.1.3",
|
||||||
"jest-emotion": "^10.0.9",
|
"jest-emotion": "^10.0.9",
|
||||||
|
"ncp": "^2.0.0",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"prettier": "1.16.4",
|
"prettier": "1.16.4",
|
||||||
"react-test-renderer": "^16.8.4",
|
"react-test-renderer": "^16.8.4",
|
||||||
|
@ -8600,6 +8600,11 @@ natural-compare@^1.4.0:
|
|||||||
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
||||||
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
|
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
|
||||||
|
|
||||||
|
ncp@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3"
|
||||||
|
integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=
|
||||||
|
|
||||||
needle@^2.2.1:
|
needle@^2.2.1:
|
||||||
version "2.2.1"
|
version "2.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d"
|
resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user