Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Clojure 在Travis CI中的REPL初始化后执行命令_Clojure_Travis Ci_Leiningen_Read Eval Print Loop - Fatal编程技术网

Clojure 在Travis CI中的REPL初始化后执行命令

Clojure 在Travis CI中的REPL初始化后执行命令,clojure,travis-ci,leiningen,read-eval-print-loop,Clojure,Travis Ci,Leiningen,Read Eval Print Loop,我目前正在使用Leiningen的Clojure项目中工作,我只是为了学习而进行转换。尽管这种语言对我来说是新的,但在编写和管理github repo的过程中,我学到了很多东西,我使用了Travis CI进行代码测试 此外,一切都进行得很顺利,直到我需要使用REPL对我的数据进行一些SPARQL查询。这就是我请求你帮助的主要原因 让我们来解释这个问题。在我的本地机器上,我可以毫无问题地执行REPL和我需要的命令,但是在Travis CI上,在我执行REPL后,它会继续侦听,但我的命令从未执行过,

我目前正在使用LeiningenClojure项目中工作,我只是为了学习而进行转换。尽管这种语言对我来说是新的,但在编写和管理github repo的过程中,我学到了很多东西,我使用了Travis CI进行代码测试

此外,一切都进行得很顺利,直到我需要使用REPL对我的数据进行一些SPARQL查询。这就是我请求你帮助的主要原因

让我们来解释这个问题。在我的本地机器上,我可以毫无问题地执行REPL和我需要的命令,但是在Travis CI上,在我执行REPL后,它会继续侦听,但我的命令从未执行过,并且在10分钟后,测试以超时错误结束。输出如下所示:

$ lein repl
nREPL server started on port 46745 on host 127.0.0.1 nrepl://127.0.0.1:46745
REPL-y 0.3.5, nREPL 0.2.6
Clojure 1.8.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_31-b13
Docs: (doc function-name-here)
      (find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e

graftertransformations.pipeline=> 

No output has been received in the last 10m0s, this potentially indicates a 
stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: 
https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

The build has been terminated
language: clojure

jdk:
  - oraclejdk8

notifications:
  email:
    on_success: never
    on_failure: never

script:
  - lein repl
  - (use 'graftertransformations.querytest)
  - (def triples (create-triple-store))
  - (.isEmpty (.getConnection triples))
  - (insert-triples triples (java.io.File. "output/celica-data.rdf"))
  - (query-result-set triples (with-common-ns-prefixes (from-file "no-limit")))
  - (clear-store triples)

after_script:
  - bash -ex test/coveralls.sh
我的.travis.yml看起来像这样:

$ lein repl
nREPL server started on port 46745 on host 127.0.0.1 nrepl://127.0.0.1:46745
REPL-y 0.3.5, nREPL 0.2.6
Clojure 1.8.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0_31-b13
Docs: (doc function-name-here)
      (find-doc "part-of-name-here")
Source: (source function-name-here)
Javadoc: (javadoc java-object-or-class-here)
Exit: Control+D or (exit) or (quit)
Results: Stored in vars *1, *2, *3, an exception in *e

graftertransformations.pipeline=> 

No output has been received in the last 10m0s, this potentially indicates a 
stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: 
https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

The build has been terminated
language: clojure

jdk:
  - oraclejdk8

notifications:
  email:
    on_success: never
    on_failure: never

script:
  - lein repl
  - (use 'graftertransformations.querytest)
  - (def triples (create-triple-store))
  - (.isEmpty (.getConnection triples))
  - (insert-triples triples (java.io.File. "output/celica-data.rdf"))
  - (query-result-set triples (with-common-ns-prefixes (from-file "no-limit")))
  - (clear-store triples)

after_script:
  - bash -ex test/coveralls.sh

我希望我已经很好地解释了我自己,如果我没有解释,我很抱歉,这是我在stackoverflow的第一个问题。最后,如果您想查看源代码,您可以在这里找到所有代码:

script
实际上不会自动键入这些命令。试着把你想要的命令放到一个文件中,然后像
lein repl
非常感谢@AlejandroC。它确实起作用了