travis-ci

How to use travis-ci's .travis.yml to provide environment parameters for Node.js Application?

北城以北 提交于 2019-12-03 07:46:16
I use travis-ci to test my node.js application. Because the application need users login with Access Key and Secret Key to test, I need to specify these two keys in travis-ci's .travis.yml file. So How can i do this? And how to get these environment parameters in Node? Like these two parameters: https://github.com/ikbear/nodejs-sdk/blob/feature/copy_and_move_file/test/rs.test.js#L22 I want to specify them in .travis.yml like this: language: node_js node_js: - 0.8 - 0.6 - 0.4 env: - QINIU_ACCESS_KEY = '2FRuiVGEsA511NS9pNd2uvuSB3k5ozXE_DHCH8Ov' QINIU_SECRET_KEY =

Travis-CI - How is time limit counted for builds? (Sum of all jobs or time of longest one)?

╄→尐↘猪︶ㄣ 提交于 2019-12-03 07:11:56
Let's say i have repo which for each push (build) starts 4 jobs (diffrent environment/compilers etc.). There is time limit for builds - 50min. Is it counted as sum of times of all builds (like in left panel), or is it independant for each job? Example: 4 builds, each taking 20minute - will it timeout becouse it will be counter as 80min or will it be ok and count as 20min (time of longest job)? The Travis CI documentation is pretty clear about this. A build consists of one or many jobs. The limit is enforced for each job: There is no timeout for a build; a build will run as long as all the jobs

How to setup an emulator running API 25 using a build matrix on Travis CI?

放肆的年华 提交于 2019-12-03 07:01:30
问题 I am attempting to setup Travis CI so that it runs instrumentation tests on an emulator running API 25. Travis runs the tests to completion on API 4/10/19, but fails to startup the emulator for API 25, with the following message: $ echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI Valid ABIs: no ABIs. Error: Invalid --abi armeabi-v7a for the selected target. The output of android list targets shows that the API 19 emulator has a Tag/ABI, whereas the API 25

How to run tests on CentOS 7 with Travis-CI?

冷暖自知 提交于 2019-12-03 06:53:01
I try to use Travis-CI to test my ansible playbooks on CentOS 7 . I got an error: error: unpacking of archive failed on file /usr/sbin/suexec: cpio: cap_set_file. Also I installed docker with: curl -sSL https://get.docker.com/ | sh on my Ubuntu: # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.04.3 LTS Release: 14.04 Codename: trusty But there is this error: #docker run --rm=true -ti centos:7 /bin/bash [root@08bf52d53465 /]# [root@ca03cf7a13e2 /]# yum install httpd -y Loaded plugins: fastestmirror base | 3.6 kB 00:00:00 extras | 3.4 kB 00:00:00

Rake db:test:prepare task deleting data in development database

江枫思渺然 提交于 2019-12-03 05:49:58
Using a simple Rails sqlite3 configuration example in my config/database.yml for a Rails 3.2.6 app, I used to reset my development database, re-seed it, and prepare my test database simply by performing: $ rake db:reset $ rake db:test:prepare After looking at this blog entry about testing a Rails application with Travis CI on different database engines, I thought I'd give it a try, so I installed mysql and postgresql using Homebrew (I'm on OSX Snow Leopard), set them up as per the brew info instructions. I installed the relevant gems, and configured the database and Travis files as follows:

Travis CI for Android

旧街凉风 提交于 2019-12-03 05:46:43
Trying to get started with Travis CI for my Android projects. First I set up dummy project with Android Bootstrap, and added a the yml file from square's otto project - modified to have my username and repo name. My build fails with the error " /home/travis/build.sh: line 94: android: command not found , even when square's project builds fine . The error seems to indicate that the path isn't set properly, in spite of having these lines in my .travis.yml export ANDROID_HOME=~/builds/f2prateek/FoodBot/android-sdk-linux export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools Is

Travis CI environment variables with Gradle properties

允我心安 提交于 2019-12-03 05:32:43
How can I use travis-ci env variables as Gradle's properties? I locally have my gradle.properties under the gradle path having: sonatypeRepo = abcd Which is used in my build.gradle : uploadArchives { //more repository(url: sonatypeRepo) { // more } //more } Of course locally it works. In travis I have added the variable under settings so I see the build log: Setting environment variables from repository settings $ export sonatypeRepo=[secure] And it fails like: FAILURE: Build failed with an exception. * Where: Build file '/home/travis/build/Diolor/Swipecards/library/build.gradle' line: 49 *

Rails database setup on Travis-CI

守給你的承諾、 提交于 2019-12-03 04:00:52
问题 I'm trying to use Travis Continuous Integration on a Rails project. The documentation says that the test db must be configured as following for SQLite3: test: adapter: sqlite3 database: ":memory:" timeout: 500 But I'd like to keep my default configuration for local tests. Is it possible to keep both my local settings and the Travis requirements? 回答1: My solution for this problem is fully based on a blog post with a few differences: Travis CI specific settings in config/database.travis.yml ;

rake db:migration not working on travis-ci build

风流意气都作罢 提交于 2019-12-03 02:21:00
I'm trying to build my Ruby on Rails project from github on Travis-CI, but I 'm running into a migration problem. It runs a rake task for migration, but it complains about the same migration step after that. It follows my .travis.yml file: language: ruby rvm: - 1.9.2 before_script: - "rake db:migrate RAILS_ENV=test" And here's the build output: 1Using worker: ruby4.worker.travis-ci.org:travis-ruby-3 2 3 4 5$ cd ~/builds 6 7 8$ git clone --depth=100 --quiet git://github.com/rafaelportela/bacilo.git rafaelportela/bacilo 9 10 11 12$ cd rafaelportela/bacilo 13 14$ git checkout -qf

How to configure Travis-CI to build pull requests & merges to master w/o redundancy

无人久伴 提交于 2019-12-03 01:47:16
问题 To put it in "BDD" terms: Background: Given I'm contributing to a GH repo When I create a pull request Then Travis should build the latest commit When I push to an existing pull request Then Travis should build the latest commit When I merge a pull request to master Then Travis should build master I was confused by Travis-CI's "build pushes" and "build PRs" settings, as: Enabling both causes each Pull Request to be build twice by Travis once for the commit on that branch and once again for