AtomLinter / linter-codeclimate

An Atom Linter plugin for the Code Climate CLI
http://github.com/codeclimate/codeclimate
MIT License
10 stars 5 forks source link

Add CI Configuration #47

Closed Arcanemagus closed 7 years ago

Arcanemagus commented 7 years ago

Add CircleCI and Travis-CI configurations to enable proper CI builds.

Arcanemagus commented 7 years ago

@maxjacobson As I am completely unfamiliar with Code Climate, maybe you have a better idea how to get CI setup for this? Apparently what I had started ~9 months ago wasn't quite ready.

maxjacobson commented 7 years ago

Heh, sure. I can try. I'm trying to get the build green locally first

Arcanemagus commented 7 years ago

Ah, if the specs are broken on a machine that it should be working on, then that's the first step 😉. Send in a PR and I'll be happy to merge it!

Btw, it looks like currently this project has no maintainer if you were interested in working on it.

maxjacobson commented 7 years ago

Btw, it looks like currently this project has no maintainer if you were interested in working on it.

Yep, happy to take that on.

Arcanemagus commented 7 years ago

@mrb as you are the original author here I should ask if it's okay to give @maxjacobson admin access as well as inviting to the team for write access (which is done 😉)

I'm actually not sure why you aren't listed on this project anymore, so if that's a mistake let me know and I can fix that too.

Arcanemagus commented 7 years ago

CircleCI is being bizarre 😕, Travis-CI is looking promising for getting a working environment though.

maxjacobson commented 7 years ago

OK fwiw the build is green for me locally now. I had to rm -rf node_modules && npm install and now it's passing

Arcanemagus commented 7 years ago

Ah good to know, so it's just the CI oddities. CircleCI seems to still be running the inference daemon, and immediately tries to setup ruby for some bizarre reason. Travis-CI on the other hand doesn't seem to be installing the necessary dependencies to get Atom to run, debugging that right now on a local instance of their image.

Arcanemagus commented 7 years ago

Awesome, Travis-CI is running the specs now so the environment there seems to be good, now to CircleCI.

Arcanemagus commented 7 years ago

Cool, Travis-CI is fully working after that.

maxjacobson commented 7 years ago

Wow, great, thanks for figuring this out. This LGTM

Arcanemagus commented 7 years ago

CircleCI is still not working, trying one last thing before just removing it.

Arcanemagus commented 7 years ago

Okay, got everything installing properly on CircleCI, but it seems to have issues actually running the tests. Since TravisCI is working I'm just going to remove it.

For reference in case anyone wants to try to get it working, here is how it looked:

dependencies:
  override:
    - curl -s -O https://raw.githubusercontent.com/atom/ci/master/build-package.sh
    - chmod u+x build-package.sh
    - git clone --depth 1 https://github.com/codeclimate/codeclimate.git
    - cd codeclimate && sudo make install

test:
  override:
    - docker info
    - codeclimate version
    - ./build-package.sh

machine:
  services:
    - docker
  environment:
    APM_TEST_PACKAGES: "linter"
Arcanemagus commented 7 years ago

@maxjacobson Any objection to re-writing this in ES2017? I've been trying to migrate everything off of CoffeeScript where possible.

maxjacobson commented 7 years ago

No philosophical objections 😄. Will everything Just Work ™️ if I have node installed and run npm install?

Arcanemagus commented 7 years ago

The only difference will be modern code in the package instead of CoffeeScript, bringing things like breakpoints that actually work like you'd expect 😛.

(You would need Node.js installed and to run npm install currently anyway)

maxjacobson commented 7 years ago

Has the atom community generally moved off of coffeescript? I have to confess that I don't follow it too closely

Arcanemagus commented 7 years ago

Atom core is slowly migrating away as things get updated, I've been moving the linter providers away as I work on them.