JulianNorton / weather-10kb-wxkb

Weather forecast that's high performance and accessible
https://wxkb.juliannorton.com
GNU General Public License v2.0
152 stars 49 forks source link

Set up circleCI auto testing on pull-requests #143

Closed JulianNorton closed 7 years ago

JulianNorton commented 7 years ago

What's the current situation?

I set up a circleCI integration but it's not working. capture

What do you recommend?

Someone who has circleCI experience google hangouts with me and help me fill the correc info.

Tardog commented 7 years ago

I don’t have experience with circleCI, but – surely it can show you a build log with more details? That might give us a clue why the build is failing.

JulianNorton commented 7 years ago

Thanks for reminding me, should have included the link! https://circleci.com/gh/JulianNorton/weather-10kb/7

Expand the npm install tab.

Tardog commented 7 years ago

It’s an issue with newer versions of npm. eslint-plugin-import has to be required in package.json – try that, and I’m sure it’s going to work.

I can also see other deprecation warnings in that log. Time to update our dependencies! But for the scope of this issue, adding the missing peer dependency should be enough.

JulianNorton commented 7 years ago

I'm trying to use circleCI 2.0.

Working Demo

2.0 Documentation

Our config file:

Tardog commented 7 years ago

Let’s see if we can get this working together.

Here is what I came up with after studying the documentation and fiddling around with Mocha/Istanbul: https://github.com/JulianNorton/weather-10kb/blob/feature-circle-ci-config/.circleci/config.yml

I also added nyc as a wrapper for running tests and creating coverage reports. Istanbul was already installed, but nyc does a better job at generating the output we need for CI.

Please give it a try with the feature-circle-ci-config branch. Fingers crossed

JulianNorton commented 7 years ago

https://circleci.com/gh/JulianNorton/weather-10kb/16

Build-agent version 0.0.3342-632334b (2017-06-10T15:30:43+0000)
Configuration errors: 1 error occurred:

* 1 error occurred:

* In job 'build': 2 errors occurred:

* missing executor type
*  is not supported executor type
Tardog commented 7 years ago

Ah, I see. The configuration requires you to either specify at least one Docker image to use for execution, or to set machine: true on the build key. I chose to go with the former and added the missing node image. Please test again.

JulianNorton commented 7 years ago

https://circleci.com/gh/JulianNorton/weather-10kb/19

It can test on the separate branch! It's also getting further before failing. I'll stop merging into master until it's figured out.

I think it's failing on this error

Directory (/home/circleci) you are trying to checkout to is not empty and not git repository

Anything you commit @Tardog will run here: https://circleci.com/gh/JulianNorton/weather-10kb/tree/feature-circle-ci-config

Tardog commented 7 years ago

Thanks – that was incredibly helpful! We have a successful build: https://circleci.com/gh/JulianNorton/weather-10kb/26

loctn commented 7 years ago

Awesome :).

JulianNorton commented 7 years ago

💃 💃 👍 🎉