exercism / clojure

Exercism exercises in Clojure.
https://exercism.org/tracks/clojure
MIT License
163 stars 157 forks source link

Set up Travis tests #64

Closed yurrriq closed 8 years ago

yurrriq commented 9 years ago

Why do the tests use load-file?

In my opinion, it's a bad practice and it caused all sorts of headaches when I was setting up track-level testing locally.

kytrinyx commented 9 years ago

I think this track was originally written by a not-quite-yet-clojure dev who used it as an experiment in learning clojure. In other words: it probably just happened that way when they shook the internet and a tutorial with load-file fell out.

yurrriq commented 9 years ago

:laughing: great description. In my solutions repo, I modified the test logic a bit to enable Travis builds. The key change (other than removing all the load-file calls) was in this (later refined) delightfully hackish project.clj.

(let [paths (-> (:out (clojure.java.shell/sh "ls"))
                (clojure.string/split #"\n")
                (->> (remove #{"README.org" "project.clj" "target"
                               ;; Removed until solved
                               "prime-factors"}))
                vec)]
  (defproject xclojure "0.1.0"
    :description  "Exercism Exercises in Clojure"
    :url          "https://github.com/yurrriq/exercism/tree/clojure"
    :source-paths ~paths
    :test-paths   ~paths
    :dependencies [[org.clojure/clojure    "1.7.0"]
                   [org.clojure/core.typed "0.3.11"]]))

In xclojure we could/should probably parse config.json in place of the ls hack.

yurrriq commented 9 years ago

@kytrinyx, can I have write privileges on this repo? Clojure is probably my strongest language at the moment, so I could be good a resource here going forward too. I have a branch locally and just failed to push it. I guess I though xclojure would be managed by the lisp team, oops.

$ git push -u origin travis-tests
ERROR: Permission to exercism/xclojure.git denied to yurrriq.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
yurrriq commented 9 years ago

Gonna think on this some more. @canweriotnow, I know you're swamped, but maybe you can take a took. I'm at a bit of a loss for now..

kytrinyx commented 9 years ago

@yurrriq I thought you did have write-access to this repo. Verifying now!

kytrinyx commented 9 years ago

Update: The lisp team didn't have access to this repo. That's fixed now.

yurrriq commented 9 years ago

Thanks! I sincerely hope people didn't get a million Travis emails while I was experimenting.. If so, I'm sorry.

kytrinyx commented 9 years ago

I didn't get any emails--it's probably fine.

yurrriq commented 8 years ago

:tada: