ci: Pin setup-clojure action to commit SHA #7
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: Test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }}-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu ] | |
| java-version: [ '8', '11', '17', '21', '23' ] | |
| name: test ${{matrix.os}} jdk${{matrix.java-version}} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Clojure deps cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.m2/repository | |
| key: $${ runner.os }}-cljdeps-${{ hashFiles('project.clj') }} | |
| restore-keys: $${ runner.os }}-cljdeps- | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: ${{ matrix.java-version }} | |
| - name: Install Babashka & Clojure | |
| uses: DeLaGuardo/setup-clojure@ada62bb3282a01a296659d48378b812b8e097360 | |
| with: | |
| lein: 'latest' | |
| - name: Install planck (linux) | |
| run: | | |
| # There are not planck binaries for jammy yet, so hack-around to use focal release | |
| sudo add-apt-repository -y "deb http://cz.archive.ubuntu.com/ubuntu focal main universe" | |
| sudo add-apt-repository -y "deb http://security.ubuntu.com/ubuntu focal-security main" | |
| # is missing after installing planck so compensate | |
| DEBIAN_FRONTEND=noninteractive sudo apt-get install -y libicu66 libjavascriptcoregtk-4.0-18 | |
| wget https://launchpad.net/~mfikes/+archive/ubuntu/planck/+files/planck_2.25.0-1ppa1~focal1_amd64.deb | |
| sudo apt-get install ./planck_2.25.0-1ppa1~focal1_amd64.deb | |
| if: runner.os == 'Linux' | |
| - name: Download deps | |
| run: lein deps | |
| - name: Tools Versions | |
| run: | | |
| echo "java -version" | |
| java -version | |
| echo "lein --version" | |
| lein --version | |
| echo "planck --version" | |
| planck --version | |
| - name: Run Tests | |
| run: lein test-all |