Separate clj and cljs #29
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
| # V1 - For all projects | |
| name: Commit validation | |
| on: | |
| push: | |
| branches: '**' | |
| # This setup to commit on commit only - as the check is not tag dependant --> https://stackoverflow.com/questions/64708371/how-to-run-github-workflow-on-every-commit-of-a-push | |
| # When the commit is rebase, it is most often creating a new predecessor so a new commit sha. It is made on purpose to test this again, in case the rebasing automatic conflict resolution would create something harmful | |
| jobs: | |
| clojure: | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] # , windows-latest There is a path issue | |
| # macOS-latest is removed to save github costs | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| check-latest: true | |
| - name: Install clojure tools | |
| # See https://github.com/DeLaGuardo/setup-clojure/commits/main/ | |
| uses: DeLaGuardo/setup-clojure@3fe9b3ae632c6758d0b7757b0838606ef4287b08 #v13.2 | |
| with: | |
| cli: 1.12.2.1565 | |
| bb: 1.12.208 | |
| clj-kondo: 2025.09.19 | |
| zprint: 1.3.0 | |
| - name: Lint | |
| run: bb lint -v | |
| - name: Setup zprint | |
| run: echo "{:search-config? true}" >> ~/.zprintrc | |
| - name: Install fdfind | |
| run: sudo rm /var/lib/man-db/auto-update && sudo apt-get install -y fd-find && mkdir -p ~/.local/bin/ && PATH=$PATH:~/.local/bin/ && ln -s $(which fdfind) ~/.local/bin/fd | |
| - name: Cache clojure dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: /home/runner/.m2/repository | |
| key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn', '.github/workflows/commit_validation.yml') }} | |
| restore-keys: cljdeps- | |
| - name: format again to check the code pushed was uptodate | |
| run: bb format -v | |
| - name: Write git diff - show what has been changed by zprint | |
| run: git diff | |
| - name: Pushed code should already be formatted | |
| # See https://github.com/CatChen/check-git-status-action | |
| uses: CatChen/check-git-status-action@d75bdbea704869e2a3b01111b4a82c49e9bd348d #v1.4.4 | |
| with: | |
| fail-if-not-clean: true | |
| request-changes-if-not-clean: false | |
| push-if-not-clean: false | |
| - name: test | |
| run: bb gha | |
| - name: print infos just for debugging, and the logs | |
| run: bb heph-info |