ci: install Clojure CLI on CD test job #633
Workflow file for this run
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: ci | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| push: | |
| paths-ignore: | |
| - "docs/**" | |
| - ".gitignore" | |
| - "CHANGELOG.md" | |
| - "DEVELOPERS.md" | |
| - "LICENSE" | |
| - "README.md" | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-24.04 | |
| env: | |
| MAVEN_OPTS: -Daether.connector.basic.threads=1 | |
| container: | |
| # Source: https://github.com/day8/dockerfiles-for-dev-ci-images | |
| image: ghcr.io/day8/chrome-56:2 | |
| credentials: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2 | |
| with: | |
| # All of the Git history is required for day8/lein-git-inject to determine the version string. | |
| fetch-depth: 0 | |
| - name: Setup Java | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: temurin | |
| java-version: "21" | |
| - name: Maven cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('project.clj', '.github/workflows/**') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Prepare Maven repository | |
| run: | | |
| mkdir -p "$HOME/.m2/repository/thheller/shadow-cljs/3.4.5" | |
| chmod -R ugo+rwX "$HOME/.m2" | |
| - name: npm cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-npm-${{ hashFiles('**/project.clj') }}-${{ hashFiles('**/deps.cljs') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm- | |
| - name: Sample Project shadow-cljs compiler cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: examples/todomvc/.shadow-cljs | |
| key: ${{ runner.os }}-shadow-cljs-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-shadow-cljs- | |
| - name: Root shadow-cljs test compiler cache | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | |
| with: | |
| path: .shadow-cljs | |
| key: ${{ runner.os }}-shadow-cljs-test-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-shadow-cljs-test- | |
| - run: lein test | |
| - name: Compile and run cljs tests | |
| run: | | |
| npm install | |
| npx shadow-cljs compile test | |
| - name: Probe :advanced ^:export contract on public.cljs | |
| run: | | |
| npx shadow-cljs release public-advanced | |
| node out/public-advanced.js | |
| - name: Compile Sample Project | |
| run: | | |
| npm install | |
| npx shadow-cljs compile app | |
| working-directory: "examples/todomvc" | |
| - name: Slack notification | |
| uses: homoluctus/slatify@61c6b12d2ae226db04062ff9b43d9679e2d53236 # v2.0.1 | |
| if: (failure() || cancelled()) && github.event_name == 'push' | |
| with: | |
| type: ${{ job.status }} | |
| job_name: re-frame-10x Tests | |
| channel: '#oss-robots' | |
| url: ${{ secrets.SLACK_WEBHOOK }} | |
| commit: true | |
| token: ${{ secrets.GITHUB_TOKEN }} |