Re: Continuous Integration: Running tests with Travis CI

Marc Abramowitz <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Oct 9, 2013, at 4:39 PM, "James K. Lowden" <[email protected]> wrote:

> On Tue, 8 Oct 2013 08:56:27 -0700
> Marc Abramowitz <[email protected]> wrote:
> 
>> Any interest in setting up Travis CI to run the FreeTDS test suite
>> automatically on every commit to git?
> 
> What do you need from us, Marc?  

I think the main thing is we have to rig up the FreeTDS unit tests so that they can get the server credentials from environment variables rather than the PWD file. This is so we can use built-in encryption features of Travis CI to keep the credentials secret so they are not abused. 

I have a PR on Gitorious that modifies one of the dblib test suite to use such environment variables. What I didn't realize until later is that there are several unittest directories and each one duplicates logic for reading PWD (and they are very similar but not always identical). So this PR is not really going to work for all of the tests and it would be somewhat invasive to modify all the test suites. So I've been thinking of abandoning that idea and instead writing a small script that reads the environment variables and writes a PWD file. This is easy and non-invasive. If you guys want to refactor the PWD reading logic, that's cool too - I just wasn't going to try that because I figured there was a high chance of me screwing something up. 

If you agree with my approach, I can send a PR for it. And in the same PR or a different one, I would add a .travis.yml file, which is essentially a YAMLized Makefile that tells Travis how to build and run the tests. It also has encrypted environment variables in it with the server credentials. 

Then you or I would set up a GitHub mirror of Gitorious. 

And then the owner of the GitHub mirror has to do a 1 minute song and dance where they sign into Travis CI with GitHub credentials and flip a switch so that Travis gets notified of new commits to the GitHub repo. 

> 
> If all you need is permissions, and you're prepared to set it up and
> take care of it, I don't see a problem.  It would be good to add a link
> to the website, too.  (The HTML is in the repository.)
> 
> --jkl
> 
> _______________________________________________
> FreeTDS mailing list
> [email protected]
> http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.