diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..82d24e8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,85 @@ +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test-clj: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3.0.2 + + - name: Setup Java + uses: actions/setup-java@v3.4.0 + with: + distribution: temurin + java-version: 17 + + - name: Setup Clojure + uses: DeLaGuardo/setup-clojure@9.3 + with: + cli: latest + lein: latest + bb: latest + + - name: Cache + uses: actions/cache@v3.0.5 + with: + path: | + ~/.m2/repository + ~/.gitlibs + ~/.deps.clj + key: cljdeps-${{ hashFiles('project.clj', 'deps.edn', 'bb.edn') }} + restore-keys: cljdeps- + + - name: Uberjar + run: lein uberjar + +# - name: Babashka tests +# run: bb test:bb + + - name: Clojure tests + run: clojure -M:cljtest:humane:runner + + - name: Integration tests + run: ./test_config $(awk -F "\"" '{print $2}' project.clj | head -n 1) uberjar + + test-cljs: + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v3.0.2 + + - name: Setup Java + uses: actions/setup-java@v3.4.0 + with: + distribution: temurin + java-version: 17 + + - name: Setup Clojure + uses: DeLaGuardo/setup-clojure@9.3 + with: + cli: latest + lein: latest + bb: latest + + - name: Cache + uses: actions/cache@v3.0.5 + with: + path: | + ~/.m2/repository + ~/.gitlibs + ~/.deps.clj + key: cljdeps-${{ hashFiles('project.clj', 'deps.edn', 'bb.edn') }} + restore-keys: cljdeps- + + - name: Uberjar + run: lein uberjar + + - name: Install Planck + run: brew install planck + + - name: ClojureScript tests + run: clojure -M:cljs-runner diff --git a/doc/using/files.md b/doc/using/files.md index 7b51c01..1dbcd31 100644 --- a/doc/using/files.md +++ b/doc/using/files.md @@ -321,7 +321,7 @@ the `:plugins` key in `project.clj`: :url "http://example.com/FIXME" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "https://www.eclipse.org/legal/epl-2.0/"} - :plugins [[lein-zprint "1.2.4"]] + :plugins [[lein-zprint "1.2.4.1"]] :dependencies [[org.clojure/clojure "1.10.0"]] :repl-options {:init-ns zpuse.core}) ``` diff --git a/project.clj b/project.clj index a6b2d43..cddf537 100644 --- a/project.clj +++ b/project.clj @@ -5,7 +5,7 @@ :url "https://opensource.org/licenses/MIT", :key "mit", :year 2015} - :plugins [[lein-doo "0.1.10"] [lein-codox "0.10.3"] [lein-zprint "1.2.4"]] + :plugins [[lein-doo "0.1.10"] [lein-codox "0.10.3"] [lein-zprint "1.2.4.1"]] :profiles {:repl {:dependencies [#_[com.taoensso/tufte "1.1.1"] [better-cond "1.0.1"] [olical/cljs-test-runner "3.7.0"]