thedevs-network / the-guard-bot

The Guard, a Telegram bot to moderate groups.
https://t.me/thedevs_bot
GNU Affero General Public License v3.0
491 stars 162 forks source link

[ci] Added CircleCI config for continuous integration #76

Closed MKRhere closed 6 years ago

MKRhere commented 6 years ago

Runs ESLint on commits once they are pushed to remote. Would need to set up CircleCI to watch the repo. It's trivial -- just go to https://github.com/marketplace/circleci Enable a free plan, and select the repo to watch.

trgwii commented 6 years ago

Might be a good idea to see if we can run some tests against different node versions?

wojpawlik commented 6 years ago

@trgwii We'd need to have tests for that, currently we only lint.

I'm interested in having tests, but I don't know how to go about testing impure functions.

trgwii commented 6 years ago

I don't know how to go about testing impure functions.

Dependency injection + mocks

wojpawlik commented 6 years ago

Would need to set up CircleCI to watch the repo.

@MKRhere maybe do it, if you can, I'd merge this after that. If you can't, probably @poeti8 needs to do it.

MKRhere commented 6 years ago

@MKRhere maybe do it, if you can

I don't have access to create an order. @poeti8 would have to do it.

@trgwii We'd need to have tests for that,

I'm interested in having tests, but I don't know how to go about testing impure functions.

Same here. Would be interesting to see how it's implemented. @trgwii want to try?

trgwii commented 6 years ago

want to try?

Yes, I have a way in mind for testing impure functions, but I'm not sure how we should structure tests, I'll leave this up to you guys

If you could make some folders with a basic test for a pure function, I'll try to sneak in some tests for impure functions as well :)

wojpawlik commented 6 years ago

@poeti8 I feel like, because the 2nd commit was correcting the first one, and they're effectively 1 commit split into 2, squash-merge would've been more appropriate here, there'd be 1 commit in the history instead of 3. I'm a fan of squash-merges anyway.

I'm not saying that this PR should be remerged, there is no need to merge with history, just a suggestion for the future.