Skip to content

ci(CircleCI Config): Migrate to CircleCI 2.0 with workflows #6041

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

Closed
wants to merge 5 commits into from
Closed

ci(CircleCI Config): Migrate to CircleCI 2.0 with workflows #6041

wants to merge 5 commits into from

Conversation

heug
Copy link

@heug heug commented Jul 6, 2017

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe: CI Improvement

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
CircleCI 2.0 allows for faster performance and reduced overall time to build and test by utilizing parallel testing via workflows. The codebase and dependencies are downloaded, cached, and are then used as part of a common workspace for the different components in npm run test, which have been split into four parallel containers.

Tests should complete in around 1m45s once the initial testing and caching has been done with CircleCI 2.0, compared to around 4m currently.

Create CircleCI 2.0 config files with parallelized testing to shorten build and test cycle

BREAKING CHANGE: N/A

N/A
@yyx990803
Copy link
Member

Thanks for PR, but why is the v2 config file so much more complex? What's the advantage of this over the current shell script?

@heug
Copy link
Author

heug commented Jul 11, 2017

Hi, thanks for reviewing!

Circle's v2 provides much more customization over v1, and as such requires a lengthier configuration file. The v2 config file in the PR pulls the code, restores and updates the dependency cache, and provides this environment as a common workspace in separate containers for the different types of testing that were present in npm run test. The different tests run in parallel now instead of sequentially, cutting the time to build and test by almost half compared to the v1 config.

@posva
Copy link
Member

posva commented Jul 11, 2017

Isn't there a simpler syntax for that. 130 lines of yml config looks like an overkill 😭
edit: don't get me wrong, cutting the time of build by 50% is amazing, but people actually need to learn too much before being able to edit that file

@heug
Copy link
Author

heug commented Jul 11, 2017

Unfortunately no, I did the best I could by using references at the top of the yml to avoid repeating many of the lines. I'd be happy to go back in and comment all the things so people can follow along and contribute more easily in the future if that sounds good!

Add comments to CircleCI 2.0 config.yml

BREAKING CHANGE: None

N/A
@posva
Copy link
Member

posva commented Jul 15, 2017

Personally, I think this can save quite some time. Having comments do help.
As a CircleCI user, v2 looked super interesting but when I wanted to use it, I was overwhelmed by how complicated it was compared to v1 (can work with zero config). It's clear how powerful it is in complex projects. Having you writing a config for vue makes it much easier understand how it works 🙂

Eugene Choe added 3 commits July 17, 2017 13:29
asdf

BREAKING CHANGE: asdf

dsa
asdf

BREAKING CHANGE: asdf

adsf
asdf

BREAKING CHANGE: asfd

sadf
@yyx990803
Copy link
Member

I played with this in the CI branch and indeed it greatly speeds up the build, but the base Node image in CircleCI 2 doesn't have java so the Selenium-based e2e tests cannot be run. If anyone wants to take this over and find a suitable docker image to use, contributions are welcome.

@yyx990803
Copy link
Member

@heug thanks again for the PR! We have enabled CircleCI 2 in #6627 :)

@yyx990803 yyx990803 closed this Sep 18, 2017
ztlevi pushed a commit to ztlevi/vue that referenced this pull request Feb 14, 2018
f2009 pushed a commit to f2009/vue that referenced this pull request Jan 25, 2019
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.

3 participants