Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up Travis tests #64

Closed
yurrriq opened this issue Aug 19, 2015 · 9 comments
Closed

Set up Travis tests #64

yurrriq opened this issue Aug 19, 2015 · 9 comments

Comments

@yurrriq
Copy link
Member

yurrriq commented Aug 19, 2015

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
Copy link
Member

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
Copy link
Member Author

yurrriq commented Aug 19, 2015

😆 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
Copy link
Member Author

yurrriq commented Aug 20, 2015

@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 added a commit to yurrriq/xclojure that referenced this issue Aug 20, 2015
$ sed -i '/^(load-file/d' */*_test.clj

See exercism#64 for discussion.
yurrriq added a commit to yurrriq/xclojure that referenced this issue Aug 20, 2015
Add cheshire as a dependency to parse config.json,
and set `:test-paths` to "_test". The test directory
is prefixed with _ to make it stand out from exercise
directories.

See exercism#64 for discussion.
@yurrriq yurrriq changed the title Why do the tests use load-file? Set up Travis tests Aug 20, 2015
@yurrriq
Copy link
Member Author

yurrriq commented Aug 20, 2015

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
Copy link
Member

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

@kytrinyx
Copy link
Member

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

@yurrriq
Copy link
Member Author

yurrriq commented Aug 22, 2015

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

@kytrinyx
Copy link
Member

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

yurrriq added a commit to yurrriq/xclojure that referenced this issue Dec 14, 2015
$ sed -i '/^(load-file/d' */*_test.clj

See exercism#64 for discussion.
yurrriq added a commit to yurrriq/xclojure that referenced this issue Dec 14, 2015
Add cheshire as a dependency to parse config.json,
and set `:test-paths` to "_test". The test directory
is prefixed with _ to make it stand out from exercise
directories.

See exercism#64 for discussion.
@yurrriq
Copy link
Member Author

yurrriq commented Dec 14, 2015

🎉

@yurrriq yurrriq closed this as completed Dec 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants