diff --git a/.clj-kondo/config.edn b/.clj-kondo/config.edn new file mode 100644 index 0000000..0d6e7ca --- /dev/null +++ b/.clj-kondo/config.edn @@ -0,0 +1,2 @@ +{:linters {:refer-all {:exclude [clojure.test slingshot.test]}} + :output {:linter-name true}} diff --git a/.github/workflows/clojure-linting.yaml b/.github/workflows/clojure-linting.yaml new file mode 100644 index 0000000..cca5cb6 --- /dev/null +++ b/.github/workflows/clojure-linting.yaml @@ -0,0 +1,30 @@ +name: Clojure Linting + +on: + pull_request: + types: [opened, reopened, edited, synchronize] + paths: ['src/**','test/**','.clj-kondo/config.edn','project.clj','.github/**'] + +jobs: + clojure-linting: + name: Clojure Linting + runs-on: ubuntu-latest + steps: + - name: setup java + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 17 + - name: checkout repo + uses: actions/checkout@v2 + - name: install clj-kondo (this is quite fast) + run: | + curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo + chmod +x install-clj-kondo + ./install-clj-kondo --dir . + - name: kondo lint + run: ./clj-kondo --lint src test + - name: eastwood lint + run: | + java -version + lein eastwood \ No newline at end of file diff --git a/.github/workflows/pr-testing.yaml b/.github/workflows/pr-testing.yaml new file mode 100644 index 0000000..6d51d17 --- /dev/null +++ b/.github/workflows/pr-testing.yaml @@ -0,0 +1,29 @@ +name: PR Testing + +on: + workflow_dispatch: + pull_request: + types: [opened, reopened, edited, synchronize] + paths: ['src/**','test/**','project.clj'] + +jobs: + pr-testing: + name: PR Testing + strategy: + fail-fast: false + matrix: + version: ['11', '17'] + runs-on: ubuntu-latest + steps: + - name: checkout repo + uses: actions/checkout@v3 + with: + submodules: recursive + - name: setup java + uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: ${{ matrix.version }} + - name: clojure tests + run: lein test + timeout-minutes: 30 \ No newline at end of file diff --git a/project.clj b/project.clj index a6c92fe..49a7842 100644 --- a/project.clj +++ b/project.clj @@ -6,7 +6,7 @@ :min-lein-version "2.7.1" - :parent-project {:coords [puppetlabs/clj-parent "5.3.0"] + :parent-project {:coords [puppetlabs/clj-parent "5.5.0"] :inherit [:managed-dependencies]} ;; Abort when version ranges or version conflicts are detected in @@ -50,6 +50,7 @@ ;; this plugin is used by jenkins jobs to interrogate the project version :plugins [[lein-parent "0.3.9"] + [jonase/eastwood "1.2.2" :exclusions [org.clojure/clojure]] [puppetlabs/i18n "0.9.2"]] :lein-release {:scm :git