Skip to content

add missing badges #305

add missing badges

add missing badges #305

name: Commit validation
on:
push:
branches: '**'
# Don't want to validate on tag push, only commits --> https://stackoverflow.com/questions/64708371/how-to-run-github-workflow-on-every-commit-of-a-push
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@v4
with:
fetch-depth: 0
- name: Install java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '22'
- name: Install clojure tools
# See https://github.com/DeLaGuardo/setup-clojure/commits/main/
uses: DeLaGuardo/setup-clojure@cc67f8308550d0f18b0ba445c2476f84626a5d6a #v13.0
with:
cli: 1.12.0.1479 # Clojure CLI based on tools.deps
bb: 1.12.195 # Babashka
clj-kondo: 2024.11.14 # Clj-kondo
zprint: 1.2.9 # zprint
- name: Install fdfind
run: sudo apt-get install -y fd-find
- name: Setup zprint
run: echo "{:search-config? true}" >> ~/.zprintrc
- name: Cache clojure dependencies
uses: actions/cache@v4
with:
path: /home/runner/.m2/repository
key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }}
restore-keys: cljdeps-
- name: Tests code alias + linter + forbidden words
run: bb wf-4 -iawlp
- name: Test code
run: bb test test-bb test-unit
- 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@bde80484b437cece974f79da735a5cd1dfdc9b0b #v1
with:
fail-if-not-clean: true
request-changes-if-not-clean: false
push-if-not-clean: false