forked from nd/lein-teamcity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use circleci.test reporter instead of monkey patching clojure.test.
It also adds support for test.check tests. See https://github.com/leafclick/circleci.test.teamcity
- Loading branch information
Showing
25 changed files
with
282 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). | ||
|
||
## [Unreleased] | ||
|
||
## v0.3.0 - 2018-01-17 | ||
|
||
- Forked from [nd/lein-teamcity](https://github.com/nd/lein-teamcity) 0.2.2 plugin. | ||
- Changed to test reporting based on [circleci.test](https://github.com/circleci/circleci.test) runner instead | ||
of monkey patching `clojure.test`. | ||
- Added support for `test.check` tests introduced with Clojure 1.9. | ||
|
||
[Unreleased]: https://github.com/leafclick/lein-teamcity/compare/v0.3.0...HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
(defproject lein-teamcity "0.2.2" | ||
(defproject com.leafclick/lein-teamcity "0.3.0" | ||
:description "Leiningen TeamCity integration" | ||
:url "http://github.com/nd/lein-teamcity" | ||
:license {:name "Eclipse Public License" | ||
:url "http://www.eclipse.org/legal/epl-v10.html"} | ||
:dependencies [[robert/hooke "1.3.0"]] | ||
:dependencies [[robert/hooke "1.3.0"] | ||
[com.leafclick/circleci.test.teamcity "0.1.0"]] | ||
:eval-in-leiningen true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
test-projects/all-pass/dev-resources/circleci_test/config.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(require '[com.leafclick.circleci.test.teamcity]) | ||
{:reporters [com.leafclick.circleci.test.teamcity/teamcity-reporter]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
test-projects/one-error/dev-resources/circleci_test/config.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(require '[com.leafclick.circleci.test.teamcity]) | ||
{:reporters [com.leafclick.circleci.test.teamcity/teamcity-reporter]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
test-projects/one-failure/dev-resources/circleci_test/config.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(require '[com.leafclick.circleci.test.teamcity]) | ||
{:reporters [com.leafclick.circleci.test.teamcity/teamcity-reporter]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
test-projects/syntax-error-test/dev-resources/circleci_test/config.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(require '[com.leafclick.circleci.test.teamcity]) | ||
{:reporters [com.leafclick.circleci.test.teamcity/teamcity-reporter]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
test-projects/syntax-error/dev-resources/circleci_test/config.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(require '[com.leafclick.circleci.test.teamcity]) | ||
{:reporters [com.leafclick.circleci.test.teamcity/teamcity-reporter]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/target | ||
/classes | ||
/checkouts | ||
pom.xml | ||
pom.xml.asc | ||
*.jar | ||
*.class | ||
/.lein-* | ||
/.nrepl-port |
2 changes: 2 additions & 0 deletions
2
test-projects/test-check-all-pass/dev-resources/circleci_test/config.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(require '[com.leafclick.circleci.test.teamcity]) | ||
{:reporters [com.leafclick.circleci.test.teamcity/teamcity-reporter]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(defproject test-check-all-pass "0.1.0-SNAPSHOT" | ||
:description "FIXME: write description" | ||
:url "http://example.com/FIXME" | ||
:license {:name "Eclipse Public License" | ||
:url "http://www.eclipse.org/legal/epl-v10.html"} | ||
:dependencies [[org.clojure/clojure "1.9.0"] | ||
[com.leafclick/circleci.test.teamcity "0.1.0"]] | ||
:plugins [[com.leafclick/lein-teamcity "0.3.0"]] | ||
|
||
:profiles {:dev {:dependencies [[org.clojure/test.check "0.9.0"]]}} | ||
|
||
:aliases {"test" ["run" "-m" "circleci.test/dir" :project/test-paths]}) |
12 changes: 12 additions & 0 deletions
12
test-projects/test-check-all-pass/src/test_check_all_pass/core.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(ns test-check-all-pass.core | ||
(:require [clojure.test :refer :all] | ||
[clojure.test.check :as tc] | ||
[clojure.test.check.properties :as prop])) | ||
|
||
(defn encrypt | ||
"I encrypt very hard." | ||
[x _k] x) | ||
|
||
(defn decrypt | ||
"I decrypt very hard." | ||
[x _k] x) |
22 changes: 22 additions & 0 deletions
22
test-projects/test-check-all-pass/test/test_check_all_pass/core_test.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(ns test-check-all-pass.core-test | ||
(:require [clojure.test :refer :all] | ||
[clojure.test.check :as tc] | ||
[clojure.spec.gen.alpha :as gen] | ||
[clojure.spec.test.alpha :as stest] | ||
[clojure.test.check.properties :as prop] | ||
[test-check-all-pass.core :refer :all])) | ||
|
||
(defmacro is-ok? | ||
[result] | ||
`(if (true? ~result) | ||
(is ~result) | ||
(is (= {} (ex-data ~result))))) | ||
|
||
|
||
(deftest crypto-should-roundtrip | ||
(testing "d(e(x,k),k) = x" | ||
(is (:result | ||
(tc/quick-check 10 | ||
(prop/for-all [message (gen/string) | ||
user-key (gen/string)] | ||
(= message (decrypt (encrypt message user-key) user-key)))))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/target | ||
/classes | ||
/checkouts | ||
pom.xml | ||
pom.xml.asc | ||
*.jar | ||
*.class | ||
/.lein-* | ||
/.nrepl-port |
4 changes: 4 additions & 0 deletions
4
test-projects/test-check-failure/dev-resources/circleci_test/config.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
(require '[com.leafclick.circleci.test.teamcity]) | ||
|
||
{:test-results-dir "target/test-results" | ||
:reporters [com.leafclick.circleci.test.teamcity/teamcity-reporter]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(defproject test-check-failure "0.1.0-SNAPSHOT" | ||
:description "FIXME: write description" | ||
:url "http://example.com/FIXME" | ||
:license {:name "Eclipse Public License" | ||
:url "http://www.eclipse.org/legal/epl-v10.html"} | ||
:dependencies [[org.clojure/clojure "1.9.0"] | ||
[com.leafclick/circleci.test.teamcity "0.1.0"]] | ||
:plugins [[com.leafclick/lein-teamcity "0.3.0"]] | ||
|
||
:profiles {:dev {:dependencies [[org.clojure/test.check "0.9.0"]]}} | ||
|
||
:aliases {"test" ["run" "-m" "circleci.test/dir" :project/test-paths]}) |
12 changes: 12 additions & 0 deletions
12
test-projects/test-check-failure/src/test_check_failure/core.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(ns test-check-failure.core | ||
(:require [clojure.test :refer :all] | ||
[clojure.test.check :as tc] | ||
[clojure.test.check.properties :as prop])) | ||
|
||
(defn encrypt | ||
"I encrypt very hard." | ||
[x _k] x) | ||
|
||
(defn decrypt | ||
"I decrypt very hard." | ||
[x _k] x) |
22 changes: 22 additions & 0 deletions
22
test-projects/test-check-failure/test/test_check_failure/core_test.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(ns test-check-failure.core-test | ||
(:require [clojure.test :refer :all] | ||
[clojure.test.check :as tc] | ||
[clojure.spec.gen.alpha :as gen] | ||
[clojure.spec.test.alpha :as stest] | ||
[clojure.test.check.properties :as prop] | ||
[test-check-failure.core :refer :all])) | ||
|
||
(defmacro is-ok? | ||
[result] | ||
`(if (true? ~result) | ||
(is ~result) | ||
(is (= {} (ex-data ~result))))) | ||
|
||
|
||
(deftest crypto-should-roundtrip | ||
(testing "m != e(m)" | ||
(is (:result | ||
(tc/quick-check 10 | ||
(prop/for-all [message (gen/string) | ||
user-key (gen/string)] | ||
(not= message (encrypt message user-key) user-key))))))) |
Oops, something went wrong.