Repository navigation
Cljs #72
This file contains hidden or 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
| --- | |
| name: Run tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| Test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| malli: ["0.14", "0.15", "0.16", "0.17", "0.18", "0.19", "latest", "head"] | |
| continue-on-error: ${{ matrix.malli == 'head' }} | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install clojure tools | |
| uses: DeLaGuardo/setup-clojure@4c7a6f613e5089821bb3bb2a33a3ee115578580d # 13.6.1 | |
| with: | |
| cli: latest | |
| - name: Run tests (malli ${{ matrix.malli }}) | |
| run: | | |
| case "${{ matrix.malli }}" in | |
| latest) | |
| clojure -X:test | |
| ;; | |
| head) | |
| sha=$(git ls-remote https://github.com/metosin/malli.git HEAD | cut -f1) | |
| echo "Testing against metosin/malli@$sha" | |
| clojure -Sdeps "{:aliases {:malli-head {:override-deps {metosin/malli {:git/url \"https://github.com/metosin/malli.git\" :git/sha \"$sha\"}}}}}" -X:test:malli-head | |
| ;; | |
| *) | |
| clojure -X:test:malli-${{ matrix.malli }} | |
| ;; | |
| esac | |
| Test-cljs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install java | |
| # ClojureScript's Closure compiler requires Java 21+ | |
| uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Install clojure tools | |
| uses: DeLaGuardo/setup-clojure@4c7a6f613e5089821bb3bb2a33a3ee115578580d # 13.6.1 | |
| with: | |
| cli: latest | |
| - name: Run tests on ClojureScript (Node) | |
| run: clojure -M:cljs-test |