Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve template CI tests #1218

Merged
merged 43 commits into from
Jan 13, 2018
Merged

Improve template CI tests #1218

merged 43 commits into from
Jan 13, 2018

Conversation

LinusBorg
Copy link
Contributor

@LinusBorg LinusBorg commented Jan 4, 2018

This PR completely changes the CI testing setup for the template - not projects generated with it, so id doesn't affect users in any way.

Changes

  • introduces ability to test different answer scenarios.
  • no more test.sh, simply set an env variable to roll out a template with a defined set of answers.
  • uses circleCI 2.0 now, for improved performance. all scenarios (currently 3) are tested in parallel.

Scenarios

Minimal

Answers "no", to all choices, so the absolutely basic setup.

Full

Answers "yes" to all choices, using the default value where possible. so it runs unit tests with jest and eslint with the "standard" config

Full-karma-airbnb

Like "Full", but uses karma instead of jest and airbnb eslint config instead of standard.

Open TODOs:

  • add npm script to run tests locally
  • remove test.sh file

@Toilal
Copy link
Contributor

Toilal commented Jan 5, 2018

It's actually far better than expect scripts ! Thanks :)

It's a shame inquirer.js doesn't support some kind of automation, the isNotTest variable seems like a hack, but it's still better than expect script that are just *** to build and maintain.

@Toilal
Copy link
Contributor

Toilal commented Jan 5, 2018

(Don't forget to squash commits 🤣 🍭)

@LinusBorg
Copy link
Contributor Author

Oh, I always squash PRs, but this one needs it badly - I fought with circleci config forever 😂😂

@codetheorist
Copy link

Could we not do away with the shell script all together now. If all of the answers are in scenarios, there's technically no need for the yes command.

Would there be a way to run all scenarios with one command?

@LinusBorg
Copy link
Contributor Author

LinusBorg commented Jan 9, 2018

Oh right, the fact that the test.sh file is still there is an oversight.

And I should add an npm script to run those tests in sequence.

For CI we run them in parallel with circleci commands, that's why in haven't added a script yet.

not needed anymore
@LinusBorg LinusBorg merged commit fd65d24 into develop Jan 13, 2018
LinusBorg added a commit that referenced this pull request Jan 13, 2018
* develop:
  bump template version (1.3.0)
  chore: remove extra comma (#1240)
  Improve template CI tests (close #1218)
  Revert "fix bad alias (fix #1239)"
  Typo, whitespace and Style Guide fixes (#1231)
  Update runner.js (#1235)
  remove unnecessary option.
  bumping eslint dependencies
  fix bad alias (fix #1239)
  remove duplicate lines in gitignore (#1214)
  fix historyFallback rewrite for Windows systems
  improved comments in eslintrc
  updated linting docs.
  respect eslint rule for order of options.
  switch to essential ruleset.
  add eslint-plugin-vue

# Conflicts:
#	template/build/build.js
c0defre4k pushed a commit to neonblack-at/webpack that referenced this pull request Jan 23, 2018
* vuejs-templates/master: (66 commits)
  Bump template version (1.3.1)
  change circleci node image to 6.12.3 to ensure node 6 compat.
  replace object rest spread with Object.assign for node6 compat. (fix
vuejs-templates#1245)
  bump template version (1.3.0)
  chore: remove extra comma (vuejs-templates#1240)
  Improve template CI tests (close vuejs-templates#1218)
  Revert "fix bad alias (fix vuejs-templates#1239)"
  Typo, whitespace and Style Guide fixes (vuejs-templates#1231)
  Update runner.js (vuejs-templates#1235)
  remove unnecessary option.
  bumping eslint dependencies
  fix bad alias (fix vuejs-templates#1239)
  fix history fallback for windows.
  remove duplicate lines in gitignore (vuejs-templates#1214)
  fix historyFallback rewrite for Windows systems
  improved comments in eslintrc
  updated linting docs.
  respect eslint rule for order of options.
  switch to essential ruleset.
  add eslint-plugin-vue
  ...

# Conflicts:
#	meta.js
#	template/package.json
#	template/src/components/HelloWorld.vue
#	template/src/main.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants