From 0982e17e6a6174325fb1f4be905e73788a2665bd Mon Sep 17 00:00:00 2001 From: David Nolen Date: Sun, 28 Jun 2020 13:38:24 -0400 Subject: [PATCH] CLI tests --- .github/workflows/test.yaml | 37 +++++++++++++++++++++++++++++++++++++ deps.edn | 5 ++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a989bdafea..3866398f8f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -122,3 +122,40 @@ jobs: - name: Run tests run: clojure -A:compiler.test:compiler.test.run + + # CLI Tests + cli-test: + name: CLI Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: DeLaGuardo/setup-clojure@2.0 + with: + tools-deps: '1.10.1.536' + + - name: Cache maven + uses: actions/cache@v2 + env: + cache-name: cache-maven + with: + path: ~/.m2 + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/deps.edn') }} + restore-keys: | + ${{ runner.os }}-${{ env.cache-name }}- + + - name: Cache gitlibs + uses: actions/cache@v2 + env: + cache-name: cache-gitlibs + with: + path: ~/.gitlibs + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/deps.edn') }} + restore-keys: | + ${{ runner.os }}-${{ env.cache-name }}- + + - name: Build Uberjar + - run: ./script/uberjar + + - name: Run tests + run: clojure -A:cli.test.run diff --git a/deps.edn b/deps.edn index ab381c5cef..1726ec04d7 100644 --- a/deps.edn +++ b/deps.edn @@ -10,7 +10,10 @@ org.clojure/tools.reader {:mvn/version "1.3.2"} org.clojure/test.check {:mvn/version "0.10.0-alpha3"}} :aliases - {:compiler.test {:extra-paths ["src/test/cljs" "src/test/cljs_build" "src/test/cljs_cp" + {:cli.test.run {:extra-paths ["src/test/cljs_cli"] + :main-opts ["-i" "src/test/cljs_cli/cljs_cli/test_runner.clj" + "-e" "(cljs-cli.test-runner/-main)"]} + :compiler.test {:extra-paths ["src/test/cljs" "src/test/cljs_build" "src/test/cljs_cp" "src/test/clojure" "src/test/self"]} :compiler.test.run {:main-opts ["-i" "src/test/clojure/cljs/test_runner.clj" "-e" "(cljs.test-runner/-main)"]}