Skip to content

Commit

Permalink
(maint) update clj-parent, enable pr testing, linting
Browse files Browse the repository at this point in the history
This updates clj-parent to 5.5.0, adds pr testing for the repo
and adds clojure linting.
  • Loading branch information
jonathannewman committed Aug 8, 2023
1 parent 7f23768 commit f7a8e77
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .clj-kondo/config.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{:linters {:refer-all {:exclude [clojure.test slingshot.test]}}
:output {:linter-name true}}
30 changes: 30 additions & 0 deletions .github/workflows/clojure-linting.yaml
Original file line number Diff line number Diff line change
@@ -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@v3
- 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
29 changes: 29 additions & 0 deletions .github/workflows/pr-testing.yaml
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f7a8e77

Please sign in to comment.