如何使用多种语言设置 Travis CI [英] How to set up Travis CI with multiple languages

查看:27
本文介绍了如何使用多种语言设置 Travis CI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目同时使用 nodejs 和 java

My project uses both nodejs and java

我尝试从 node_js 构建开始,然后安装 java(因为这是一个 npm 模块)

I tried starting off with a node_js build then installing java (since this is an npm module)

但是安装 java 的脚本失败了,而且我认为当已经存在使用 java 的构建时不需要安装它.

but the scripts to install java failed, plus I don't think there's a need to install it when there is a build with java that already exists.

我应该从 Java 构建开始然后安装节点吗?

should I start off with a java build then install node?

我正在尝试

language: java
  - oraclejdk8
language: node_js
node_js:
  - "0.10"

它似乎忽略了前 2 行,并构建了一个包含 java 7 的 node_js 构建我的项目使用 java 8

which ignores the first 2 lines it seems and builds a node_js build which has java 7 and my project uses java 8

我试过这个回答python

I tried this answer for python

使用

language: node_js
node_js:
  - "0.10"
java: oraclejdk8

但是没用

如何添加 java 8?

How can I add java 8?

推荐答案

我使用了这个 .yml:

language: java
jdk:
    - oraclejdk8
node_js: "0.10"
install: "npm install"
script: "npm test"

这篇关于如何使用多种语言设置 Travis CI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆