rubex
rubex copied to clipboard
Setup Travis, Gitter and other services.
General checklist of things to setup:
-
[x] Travis CI for linux and macOS
-
[ ] Gitter
-
[x] Rubygems version
-
[ ] Code Climate
-
[ ] Add mention of #sciruby IRC channel on freenode.
-
[x] SimpleCov
We can add Code Climate too. It's free for open-source.
@v0dro Can I setup travis CI for linux and macOS?
@Paarmita sure. Commit to master branch.
@v0dro since we are refactoring a lot, should we consider adding SimpleCov for checking test suite coverage?
The tests don't test any API. They are there for mostly black box testing where the rubex program is compiled and run with some sample input to generate a given output. Unit testing will involve making ASTs manually which is a tedious and time consuming task.
Makes sense, but with Simplecov we could at least judge what parts of the code are getting covered in those Black box tests.
Unit testing will involve making ASTs manually which is a tedious and time consuming task.
For this, we could start with pending tests and at least document a way to write unit test cases. What do you think?
Unit tests for ASTs would be a massive waste of effort. The AST will mostly change with every update since something as simple as a refactor can change the nature of the AST. For example, have a look at the Cython tests: https://github.com/cython/cython/tree/master/tests
They only have hundreds of test files for testing every function of Cython minutely. They never test the Cython API itself (or the AST).
How does simplecov work? Will it actually run the code and see what gets run and what doesn't?
No no, SimpleCov will just trace which parts of the code were touched by the tests.
I've setup SimpleCov on a separate branch, here's the result:

An Example File covered by Simplecov:

Oh. Ok then I'm up for it.
I've updated the checklist.
@v0dro I've enabled Travis on the Travis-CI website.