-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb9b02c
commit c746989
Showing
7 changed files
with
134 additions
and
66 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,30 @@ | ||
name: Main tests | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
tests: | ||
strategy: | ||
matrix: | ||
java: ['17', '18', '19'] | ||
os: [ubuntu-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'corretto' | ||
java-version: ${{ matrix.java }} | ||
|
||
- uses: DeLaGuardo/[email protected] | ||
with: | ||
lein: latest | ||
|
||
- uses: actions/cache@v4 | ||
id: cache-deps | ||
with: | ||
path: ~/.m2/repository | ||
key: deps-${{ hashFiles('project.clj') }} | ||
restore-keys: deps- | ||
|
||
- run: lein test-all |
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,2 +1,2 @@ | ||
github: ptaoussanis | ||
custom: "https://www.taoensso.com/clojure/backers" | ||
custom: "https://www.taoensso.com/clojure" |
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,60 +1,76 @@ | ||
(defproject com.taoensso/tengen "1.1.0" | ||
:author "Peter Taoussanis <https://www.taoensso.com>" | ||
:description "Simple let-based Reagent component fns for Clojure/Script" | ||
:url "https://github.com/ptaoussanis/tengen" | ||
:license {:name "Eclipse Public License" | ||
:url "http://www.eclipse.org/legal/epl-v10.html" | ||
:distribution :repo | ||
:comments "Same as Clojure"} | ||
:min-lein-version "2.3.3" | ||
:global-vars {*warn-on-reflection* true | ||
*assert* true} | ||
:description "Simple React component DSL for Clojure/Script" | ||
:url "https://github.com/taoensso/tengen" | ||
|
||
:dependencies | ||
[[com.taoensso/encore "3.10.1"]] | ||
:license | ||
{:name "Eclipse Public License - v 1.0" | ||
:url "https://www.eclipse.org/legal/epl-v10.html"} | ||
|
||
:test-paths ["test" #_"src"] | ||
|
||
:plugins | ||
[[lein-pprint "1.3.2"] | ||
[lein-ancient "0.6.15"] | ||
[lein-codox "0.10.7"] | ||
[lein-cljsbuild "1.1.8"]] | ||
:dependencies | ||
[[com.taoensso/encore "3.31.0"]] | ||
|
||
:profiles | ||
{;; :default [:base :system :user :provided :dev] | ||
:server-jvm {:jvm-opts ^:replace ["-server"]} | ||
:provided {:dependencies [[org.clojure/clojure "1.10.1"] | ||
[org.clojure/clojurescript "1.10.773"] | ||
[reagent "1.0.0"]]} | ||
:1.8 {:dependencies [[org.clojure/clojure "1.8.0"]]} | ||
:1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]} | ||
:1.10 {:dependencies [[org.clojure/clojure "1.10.1"]]} | ||
:test {:dependencies [[org.clojure/test.check "1.1.0"]]} | ||
:depr {:jvm-opts ["-Dtaoensso.elide-deprecated=true"]} | ||
:dev [:1.10 :test :server-jvm :depr]} | ||
:provided {:dependencies [[reagent "1.1.1"] | ||
[org.clojure/clojurescript "1.11.60"] | ||
[org.clojure/clojure "1.11.1"]]} | ||
:c1.12 {:dependencies [[org.clojure/clojure "1.12.0-alpha9"]]} | ||
:c1.11 {:dependencies [[org.clojure/clojure "1.11.1"]]} | ||
:c1.10 {:dependencies [[org.clojure/clojure "1.10.3"]]} | ||
:c1.9 {:dependencies [[org.clojure/clojure "1.9.0"]]} | ||
|
||
:cljsbuild | ||
{:test-commands | ||
{"node" ["node" :node-runner "target/main.js"] | ||
"phantom" ["phantomjs" :runner "target/main.js"]} | ||
:dev | ||
{:jvm-opts | ||
["-server" | ||
"-Dtaoensso.elide-deprecated=true"] | ||
|
||
:global-vars | ||
{*warn-on-reflection* true | ||
*assert* true | ||
*unchecked-math* false #_:warn-on-boxed} | ||
|
||
:dependencies | ||
[[org.clojure/test.check "1.1.1"] | ||
[cljsjs/react "17.0.2-0"] | ||
[cljsjs/react-dom "17.0.2-0"] | ||
[reagent "1.1.1"]] | ||
|
||
:plugins | ||
[[lein-pprint "1.3.2"] | ||
[lein-ancient "0.7.0"] | ||
[lein-cljsbuild "1.1.8"] | ||
[com.taoensso.forks/lein-codox "0.10.11"]] | ||
|
||
:codox | ||
{:language #{:clojure :clojurescript} | ||
:base-language :clojure}}} | ||
|
||
:cljsbuild | ||
{:test-commands {"node" ["node" "target/test.js"]} | ||
:builds | ||
[{:id :main | ||
:source-paths ["src" "test"] | ||
:source-paths ["src"] | ||
:compiler | ||
{:output-to "target/main.js" | ||
:optimizations :advanced | ||
:pretty-print false}}]} | ||
:optimizations :advanced}} | ||
|
||
{:id :test | ||
:source-paths ["src" "test"] | ||
:compiler | ||
{:output-to "target/test.js" | ||
:target :nodejs | ||
:npm-deps true | ||
:optimizations #_:simple :none | ||
:main taoensso.tengen-tests}}]} | ||
|
||
:aliases | ||
{"start-dev" ["with-profile" "+dev" "repl" ":headless"] | ||
"deploy-lib" ["do" "build-once," "deploy" "clojars," "install"] | ||
"build-once" ["cljsbuild" "once"] | ||
"test-cljs" ["cljsbuild" "test"] | ||
"test-all" | ||
["do" ["clean"] | ||
"with-profile" "+1.10:+1.9" "test," | ||
"with-profile" "+test" "cljsbuild" "test"]} | ||
|
||
:repositories | ||
{"sonatype-oss-public" | ||
"https://oss.sonatype.org/content/groups/public/"}) | ||
"build-once" ["do" ["clean"] ["cljsbuild" "once"]] | ||
"deploy-lib" ["do" ["build-once"] ["deploy" "clojars"] ["install"]] | ||
|
||
"test-clj" ["with-profile" "+c1.12:+c1.11:+c1.10:+c1.9" "test"] | ||
"test-cljs" ["with-profile" "+c1.12" "cljsbuild" "test"] | ||
"test-all" ["do" ["clean"] ["test-clj"] ["test-cljs"]]}) |
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,24 @@ | ||
(ns taoensso.tengen-tests | ||
(:require | ||
[clojure.test :as test :refer [deftest testing is]] | ||
[taoensso.encore :as enc] | ||
[taoensso.tengen.common :as common])) | ||
|
||
(comment | ||
(remove-ns 'taoensso.tengen-tests) | ||
(test/run-tests 'taoensso.tengen-tests)) | ||
|
||
;;;; | ||
|
||
#?(:clj (deftest _test-clj (is (= 1 1)))) | ||
#?(:cljs (deftest _test-cljs (is (= 1 1)))) | ||
|
||
;;;; | ||
|
||
#?(:cljs | ||
(defmethod test/report [:cljs.test/default :end-run-tests] [m] | ||
(when-not (test/successful? m) | ||
;; Trigger non-zero `lein test-cljs` exit code for CI | ||
(throw (ex-info "ClojureScript tests failed" {}))))) | ||
|
||
#?(:cljs (test/run-tests)) |