travis-ci

trigger travis CI build only with specific commit message

≯℡__Kan透↙ 提交于 2019-12-21 13:52:42
问题 I want travis to start only if I have a certian commit message. how can i do this. My travis.yml file is here I know there is an on condition from this question but I dont know where to put it. 回答1: The question you mentioned regards deploying travis build. So on: condition only determines if build is deployed or not. Regardless this setting other build steps are executed on each commit/pull request. What you could use instead is adding [ci-skip] or [skip-ci] in commit messages to force build

How to get travis to fail if tests do not have enough coverage for python

旧时模样 提交于 2019-12-21 12:01:45
问题 I it possible to have travis fail if my test don't have enough coverage, say < 90% for example. Normally I run my tests with the following travis config entry. script: - coverage run --source="mytestmodule" setup.py test 回答1: According to this link, if you add the --fail-under switch to the coverage report command, it will exit with a non-zero exit code (which travis will see as a failure) if the code coverage is below the given percentage. That would make the script section of your .travis

Elixir mix auto acknowledge

无人久伴 提交于 2019-12-21 08:17:59
问题 I want to run tests of my Phoenix app on Travis-CI. Log excerpt: $ MIX_ENV=test mix do deps.get, compile, test Could not find hex, which is needed to build dependency :phoenix Shall I install hex? [Yn] When it comes to fetching and installing dependencies, it asks if it should install hex . I was wondering if I can pass a --yes option to mix so that it doesn't ask but just installs? 回答1: As with any unix command, you could pipe yes into the mix command: yes | MIX_ENV=test mix do deps.get,

How do I cache global NPM packages on Travis CI?

半腔热情 提交于 2019-12-21 07:18:05
问题 Locally installed packages are cached via: # .travis.yml ... cache: directories: - node_modules ... But how do I cache globally installed packages ( $ npm install -g <...> ) to speed up my builds? 回答1: This is how I did it: cache: directories: # Replace "grunt-cli" with whatever global binary you're using - $(npm config get prefix)/bin/grunt-cli EDIT: As was pointed out in the comments, $(npm config get prefix)/bin contains symlinks to other code. This is untested but would probably work: $

How do I configure Travis-CI to use the correct time zone for a rails app?

喜你入骨 提交于 2019-12-21 07:14:04
问题 In my application.rb, I have config.time_zone = "Pacific Time (US & Canada)" And this works correctly in development/test, and production servers. However when I push to Travis-CI, it appears to be localized to UTC for example the output of I18n.l Time.now . Is there something different about the Travis-CI ruby/rails environment? 回答1: The way I accomplish setting the timezone is in the before_script section of the travis.yml They give you root access to the VM running your project, so you can

Where can I download the 64-bit Travis-CI VM images?

六眼飞鱼酱① 提交于 2019-12-21 03:41:36
问题 These two blog posts describe a way to debug failing regression tests using the same VM image that Travis-CI uses. It's a great idea, but the download link given there is out-of-date: the .box files they link to are 32-bit images, and Travis-CI now uses 64-bit images. Where can I download the 64-bit images that Travis-CI now uses? Update: Just in case it's useful: These days I use CircleCI for continuous integration, which offers easy-to-use ssh access to the build container. That makes

travis-ci script

萝らか妹 提交于 2019-12-20 17:35:37
问题 I'm trying to setup phing to work with travis-ci, but I can't get it to run a setup script to get all the dependencies installed. My .travis.yml file is: language: php php: - 5.2 script: ./.travis-phing.sh In travis, I get the error: /home/travis/build.sh: line 105: ./.travis-phing.sh: Permission denied What is causing that? 回答1: Solved The script to be set to execute. I used: chmod a+x .travis-phing.sh Then simply commit, and push back to github. 回答2: Run the script using bash Another option

Cache Brew builds with travis ci

99封情书 提交于 2019-12-20 10:43:56
问题 I have a Travis CI osx build with a brew dependency that has to be built from source. I know that Travis has the cache feature, but it doesn't have any documentation on how to cache brew builds or outputs. Any idea on how to cache a brew package in travis? 回答1: There are 3 separate, loosely related problems here: Cache downloaded bottles Cache locally-built bottles Cache Homebrew metadata You don't necessarily need all three, so follow whichever sections fit your needs. Cache downloaded

Chromedriver on Travis-CI

你。 提交于 2019-12-20 09:49:41
问题 I am having trouble getting chromedriver on Travis-CI working for my project knockout-secure-binding. I am trying to use WebdriverJS to automate testing with Chrome, at the least. I noted that there seems to be some issues with chromedriver on Travis-CI, including: http://github.com/travis-ci/travis-ci/issues/938 http://github.com/travis-ci/travis-ci/issues/272 https://code.google.com/p/chromedriver/issues/detail?id=308 The issue seems to be a variant of "chrome not reachable", and from what

java generics and annotations not supported in version 1.3 (travis integration)

北慕城南 提交于 2019-12-20 09:39:42
问题 I'm trying to integrate my github Java/PHP project with travis-ci environment. This is my travis configuration: language: java jdk: - openjdk7 - oraclejdk7 script: mvn test Below is the output that travis prints: Using worker: bluebox-linux-1.worker.travis-ci.org:travis-linux-9 $ git clone --depth=50 --branch=master git://github.com/tkoomzaaskz/wealthy-laughing-duck.git tkoomzaaskz/wealthy-laughing-duck Cloning into 'tkoomzaaskz/wealthy-laughing-duck'... remote: Counting objects: 458, done.