Citizens of the Imperium

Citizens of the Imperium (http://www.travellerrpg.com/CotI/Discuss/index.php)
-   Software Solutions (http://www.travellerrpg.com/CotI/Discuss/forumdisplay.php?f=63)
-   -   Using Travis (http://www.travellerrpg.com/CotI/Discuss/showthread.php?t=39102)

Leitz May 26th, 2018 03:45 PM

Using Travis
 
For those who like to test in addition to your tests, check out travis-ci.org. When you link your GitHub repo to Travis, and have a good ".travis.yml" file (note the preceding dot), any git push triggers a travis run. You can specify a few things like what version(s) of your language to run, etc. Seeing that green "passed" is a nice way to end your coding session.

Here's the .travis.yml file for my rb_tools repo:
Code:

language: ruby

rvm:
  - 2

install: gem install sqlite3

This one is for the py_tools repo:
Code:

language: python

python:
 - "2.6"
 - "2.7"
 - "3.6"
 - "nightly"

script:
  pytest


Leitz September 8th, 2018 07:50 AM

I've been learning how to use MongoDB and Ruby together, but the Travis runs failed because I was testing against an already populated data set. Figured out how to drop the data set between tests and set Travis up to pass. Yay!

Code:

# .travis.yml

language: ruby

rvm:
  - 2

install:
  - gem install sqlite3 mongo

services:
  - mongodb



All times are GMT -4. The time now is 09:25 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2010-2013, Far Future Enterprises. All Rights Reserved.