travis-ci

How to test both Python and C++ in one .travis.yml without running the C++ multiple times?

元气小坏坏 提交于 2019-12-07 18:57:56
问题 https://github.com/travis-ci/travis-ci/issues/538 doesn't seem to really help. I have this .travis.yml for libais: language: python python: - "2.7" - "3.4" before_install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update -qq install: - sudo apt-get install -qq gcc-4.8 g++-4.8 - CC=g++-4.8 python setup.py install script: - python setup.py test - (cd src && CC=gcc-4.8 CXX=g++-4.8 make -f Makefile-custom test) The last line of the script triggers the c++ testing. It

What do I need for Travis-CI to decrypt secure variables on my fork?

烂漫一生 提交于 2019-12-07 16:23:13
问题 I have forked a Github repository and would like to use travis-ci, as the original repository does, to run tests when I commit. However, the AWS keys, which are encrypted, are not decrypted and keep the tests from succeeding. Since my workplace owns the original repository, I have access to whatever is needed, but am unsure what information to retrieve, where to find it, or what to do with it. For clarity, here is the pertinent part of the .travis.yml: env: global: - NODE_ENV: test - [...] -

Can Travis CI use an encrypted file in different forks of the same repo?

柔情痞子 提交于 2019-12-07 13:55:10
问题 I'm trying to get a Travis CI build to work in both my own private fork and the repo of my organization. I encrypted a config file using the travis encrypt-file command and it seems to have created two environment variables in the travis settings for my own fork that look like: "encrypted_d1234_key" and "encrypted_d1234_iv". These are used when the build runs to decrypt the config file, like so: openssl aes-256-cbc -K $encrypted_d1234_key -iv $encrypted_d1234_iv -in test.config.enc -out test

Script “heroku login” in a CI environment

久未见 提交于 2019-12-07 12:56:42
问题 Is there a sanctioned way to either script or bypass the Heroku Toolbelt's login prompt? I've come across a number of hacks which claim to provide a solution (expect, environment variables, interpolating environment variables in .netrc, etc.), but I'd really like to find a stable solution. 回答1: From what I see in the docs, there's three ways one can go about this. Method 1: Login via CLI The first one is to authenticate via Login&Password (bleh). Knowing the input format - login on one line,

Travis-ci & Gobject introspection

故事扮演 提交于 2019-12-07 12:43:33
问题 I'm trying to setup Travis for Getting Things GNOME!. My .travis.yml: language: python python: - '3.3' before_install: - sudo apt-get update - sudo apt-get install -qq python3-gi gir1.2-gtk-3.0 virtualenv: system_site_packages: true install: - pip install -e git+git://github.com/getting-things-gnome/liblarch.git#egg=liblarch - pip install -r requirements.txt script: - ./run-tests However, build fails: ====================================================================== ERROR: Failure:

Travis CI Android - Can't find version that matches

柔情痞子 提交于 2019-12-07 08:13:45
问题 Hy people, I'd like to test my android application with Travis after pushing to Github. Unfortunately, I have an issue I can't solve for days: Could not resolve all dependencies for configuration ':app:_defaultFlavorDebugCompile'. > Could not find any version that matches com.google.android.gms:play-services:5.+. Required by: weightlifting_app_schwedt:app:unspecified > Could not find any version that matches com.android.support:support-v4:20.+. Required by: weightlifting_app_schwedt:app

Different configs in each git branch

百般思念 提交于 2019-12-07 07:23:39
I have two git branches: dev and master I'm using Travis CI for builds and testing and need to have different .travis.yml and config.yml.enc (encrypted config file) for each branch/environment. How do I merge changes from dev->master without merging the .travis.yml and config.yml.enc files? You have multiple options here (on master branch): You can either run: git merge --no-commit dev git checkout .travis.yml git checkout config.yml.end git commit -m "merge dev into master" This will merge the files then revert the two files to the last master commit. Or you can run (if your commit history is

Post Build event with condition

不问归期 提交于 2019-12-07 07:14:36
问题 Having the need to add a condition to the Post Build event in my Visual Studio 2013 project, I ended up with the following: <PropertyGroup Condition=" '$(OS)' == 'Windows_NT' "> <PostBuildEvent>"$(SolutionDir)..\Deploy\Build\sign-bin.cmd"</PostBuildEvent> </PropertyGroup> I've added the condition Condition=" '$(OS)' == 'Windows_NT' " manually with a text editor to the CSPROJ file. This works as expected, my solution builds successfully both in Visual Studio as well as in Travis CI. What doesn

Django SECURE_SSL_REDIRECT and 301 HTTP responses

吃可爱长大的小学妹 提交于 2019-12-07 07:05:26
问题 In environments different from local, I set DJ_SSL_REDIRECT = True for my Django project. But now, all my unit tests related to REST API endpoints failed when they are run in another environment (for example, in Travis CI). What is happening is that all HTTP responses are 301 (I'm expecting 2XX or 4XX in my tests) because of the DJ_SSL_REDIRECT setting, as explained in doc : If you set the SECURE_SSL_REDIRECT setting to True, SecurityMiddleware will permanently (HTTP 301) redirect all HTTP

Travis-CI: docker image as build environment

人盡茶涼 提交于 2019-12-07 05:25:29
问题 In Travis CI is it possible to run the build process from inside a docker container? In GitLab CI this is the default. We can simply define the image in .gitlab-ci.yml then all the build/test/deploy will run inside that container. However, Travis seems to have totally different view about docker usage. How can I achieve a similar behavior in Travis? 回答1: It turns out this is easier to do with Travis-CI than it first appears. All you have to do is write your normal build script using docker