-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue #431 * 0.2.20-SNAPSHOT #8 * Extract test code from the 'changes' component to the 'test' component. (#449) * Refactor code from the 'changes' component to the new 'test' component. * Add more test to catch if the code that calculates which tests to run breaks. * Update libraries to the latest version.
- Loading branch information
1 parent
68b7739
commit b6e4dd6
Showing
40 changed files
with
496 additions
and
293 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,4 +1,4 @@ | ||
{:paths ["src"] | ||
:deps {com.github.liquidz/antq {:mvn/version "2.8.1173"}} | ||
:deps {com.github.liquidz/antq {:mvn/version "2.8.1185"}} | ||
:aliases {:test {:extra-paths ["test"] | ||
:extra-deps {}}}} |
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
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,4 +1,4 @@ | ||
{:paths ["src"] | ||
:deps {org.clojure/tools.deps {:mvn/version "0.18.1398"}} | ||
:deps {org.clojure/tools.deps {:mvn/version "0.19.1417"}} | ||
:aliases {:test {:extra-paths ["test"] | ||
:extra-deps {}}}} |
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
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,6 +1,6 @@ | ||
{:paths ["src"] | ||
:deps {clj-commons/fs {:mvn/version "1.6.310"} | ||
org.clojure/tools.deps {:mvn/version "0.18.1398"} | ||
:deps {clj-commons/fs {:mvn/version "1.6.311"} | ||
org.clojure/tools.deps {:mvn/version "0.19.1417"} | ||
borkdude/edamame {:mvn/version "1.4.25"}} | ||
:aliases {:test {:extra-paths [] | ||
:extra-deps {}}}} |
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,4 +1,4 @@ | ||
{:paths ["src"] | ||
:deps {djblue/portal {:mvn/version "0.51.1"}} | ||
:deps {djblue/portal {:mvn/version "0.52.2"}} | ||
:aliases {:test {:extra-paths [] | ||
:extra-deps {}}}} |
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 @@ | ||
{:paths ["src" "resources"] | ||
:deps {} | ||
:aliases {:test {:extra-paths ["test"] | ||
:extra-deps {}}}} |
2 changes: 1 addition & 1 deletion
2
...lylith/clj/core/change/bricks_to_test.clj → ...polylith/clj/core/test/bricks_to_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
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 ^:no-doc polylith.clj.core.test.core | ||
(:require [polylith.clj.core.test.bricks-to-test :as bricks-to-test] | ||
[polylith.clj.core.test.projects-to-test :as projects-to-test] | ||
[polylith.clj.core.common.interface :as common] | ||
[polylith.clj.core.git.interface :as git])) | ||
|
||
(defn nothing-to-test [project] | ||
(assoc project :bricks-to-test [] | ||
:projects-to-test [])) | ||
|
||
(defn with-test-calculations [{:keys [ws-dir user-input projects paths changes] :as workspace}] | ||
(if (common/invalid-workspace? workspace) | ||
workspace | ||
(if (-> ws-dir git/is-git-repo? not) | ||
(assoc workspace :projects (mapv nothing-to-test projects)) | ||
(let [{:keys [changed-components changed-bases changed-projects changed-or-affected-projects]} changes | ||
{:keys [is-dev is-all is-run-all-brick-tests is-run-project-tests selected-bricks selected-projects]} user-input | ||
projects-with-keys (mapv #(-> % | ||
(bricks-to-test/with-bricks-to-test changed-projects changed-components changed-bases selected-bricks selected-projects is-dev is-run-all-brick-tests) | ||
(projects-to-test/with-projects-to-test paths changed-or-affected-projects selected-projects is-dev is-run-project-tests is-all)) | ||
projects)] | ||
(assoc workspace :projects projects-with-keys))))) |
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,7 @@ | ||
(ns ^:no-doc polylith.clj.core.test.interface | ||
(:require [polylith.clj.core.test.core :as core])) | ||
|
||
(defn with-test-calculations | ||
"Make sure to first call changes/with-changes before calling this function." | ||
[workspace] | ||
(core/with-test-calculations workspace)) |
2 changes: 1 addition & 1 deletion
2
...lith/clj/core/change/projects_to_test.clj → ...lylith/clj/core/test/projects_to_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
6 changes: 3 additions & 3 deletions
6
...h/clj/core/change/bricks_to_test_test.clj → ...ith/clj/core/test/bricks_to_test_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
4 changes: 2 additions & 2 deletions
4
...clj/core/change/projects_to_test_test.clj → ...h/clj/core/test/projects_to_test_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
2 changes: 1 addition & 1 deletion
2
...st/polylith/clj/core/change/test_data.clj → ...test/polylith/clj/core/test/test_data.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
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,4 +1,4 @@ | ||
{:paths ["src"] | ||
:deps {org.clojure/tools.deps {:mvn/version "0.18.1398"}} | ||
:deps {org.clojure/tools.deps {:mvn/version "0.19.1417"}} | ||
:aliases {:test {:extra-paths ["test"] | ||
:extra-deps {}}}} |
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
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
Oops, something went wrong.