From 88cc462a553ee09a50a9fab3e6ddb98d464ef087 Mon Sep 17 00:00:00 2001 From: Sergei Zharinov Date: Wed, 27 Jul 2022 21:28:38 +0300 Subject: [PATCH 1/5] Add test workflow --- .github/workflows/test.yml | 79 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b31d6c3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,79 @@ +on: + - push + +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 + + 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 From 83f8fa289d7a9cc02625faeeb00278cc68b560dc Mon Sep 17 00:00:00 2001 From: Sergei Zharinov Date: Thu, 4 Aug 2022 16:17:43 +0300 Subject: [PATCH 2/5] Bump `lein-zprint` to 1.2.4.1 --- doc/using/files.md | 2 +- project.clj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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"] From 4f7b9bf70a3934c7c6a7083e50fd2e5f63b0b525 Mon Sep 17 00:00:00 2001 From: Sergei Zharinov Date: Thu, 4 Aug 2022 16:52:11 +0300 Subject: [PATCH 3/5] Add integration test --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b31d6c3..f72ec12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,6 +40,9 @@ jobs: - 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: From 2abdd42d54e75fe9c2e6fdeb96d14e34502f214f Mon Sep 17 00:00:00 2001 From: Sergei Zharinov Date: Thu, 4 Aug 2022 16:54:47 +0300 Subject: [PATCH 4/5] Skip bb test for now --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f72ec12..b8c3c5b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,8 +34,8 @@ jobs: - name: Uberjar run: lein uberjar - - name: Babashka tests - run: bb test:bb +# - name: Babashka tests +# run: bb test:bb - name: Clojure tests run: clojure -M:cljtest:humane:runner From cac2df4f89f62a650a63afa04dce2f752b815943 Mon Sep 17 00:00:00 2001 From: Sergei Zharinov Date: Fri, 5 Aug 2022 21:43:40 +0300 Subject: [PATCH 5/5] Change event triggers --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8c3c5b..82d24e8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,8 @@ on: - - push + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: test-clj: