I'm building 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've also written some python tests in a file called test_pcst_fast.py
. Is there some way to call those from travis as well?
It seems ambiguous as to whether travis supports multiple languages in one file, but it seems like most people pull this off despite only listing one language under the language
tag.
The first job is to build the image and the second job is going to be to run the NPM test target.
Configuration. Travis CI is configured by adding a file named . travis. yml , which is a YAML format text file, to the root directory of the repository.
Prerequisites # To start using Travis CI, make sure you have: A GitHub or Bitbucket or GitLab or Assembla account. Owner permissions for a project hosted on GitHub or Bitbucket or GitLab or Assembla.
Like Jenkins, Travis CI is also one of the early players in the CI/CD tools market. The tool is written in Ruby and is developed & maintained by the Travis CI community. Travis CI was earlier available only for GitHub hosted projects but now it also supports Bitbucket hosted projects.
Travis doesn't support multiple languages per job yet.
Look at categories after_success
and after_script
in the Travis build lifecycle docs
Also, you can add more build scripts, they will run independently, just list them like this:
script:
- "make pcst_fast_test && ./pcst_fast_test"
- "./test_pcst_fast.py"
If there is no python installed (not sure about c
builds), you can install it, check out this .travis.yml, it installs custom python interpreter as a dependency.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With