Support for two languages ​​in the travis.ci file

I am creating a python package which is mostly C ++ code (think numpy)

My travis file is currently

language: cpp
compiler:
  - gcc
  - clang
os:
  - linux
  - osx
dist: trusty

script: "make pcst_fast_test && ./pcst_fast_test"

notifications: 
...

But I also wrote some python tests in a file named test_pcst_fast.py. Is there any way to call them from travis?

It seems ambiguous as to whether Travis supports multiple languages ​​in a single file , but it seems that most people remove this, despite the fact that they list only one language under the tag language.

+6
source share
2 answers

Travis does not support multiple languages ​​per task.

Look at the categories after_successand after_script in the Travis build lifecycle documents

, , , :

script:
    - "make pcst_fast_test && ./pcst_fast_test"
    - "./test_pcst_fast.py"

python ( c), , .travis.yml, python .

+2

, , , node_js node.

, nvm TravisCI.

,

  • nvm install 0.10

  • nvm use 0.10

before_install, v0.10.x node.

Java Travis nvm node.js runtimes:

.travis.yml

language: java

jdk:
  - oraclejdk8

env:
  - NODE_VERSION="0.12"

before_install:
  - nvm install $NODE_VERSION

node , , nvm .

nvm, .travis.yml:

before_install:
  - wget https://raw.githubusercontent.com/creationix/nvm/v0.31.0/nvm.sh -O ~/.nvm/nvm.sh
  - source ~/.nvm/nvm.sh
  - nvm install 5 # for Node v5
  - node --version

, nvm v0.31, node v5.

0

Source: https://habr.com/ru/post/1015979/


All Articles