Skip to content

Commit f204bb1

Browse files
(maint) add pr testing and linting
This adds PR based testing and kondo and eastwood linting via github actions.
1 parent fce0b63 commit f204bb1

File tree

3 files changed

+61
-1
lines changed

3 files changed

+61
-1
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Clojure Linting
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, edited, synchronize]
6+
paths: ['src/**','test/**','.clj-kondo/config.edn','project.clj','.github/**']
7+
8+
jobs:
9+
clojure-linting:
10+
name: Clojure Linting
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: setup java
14+
uses: actions/setup-java@v3
15+
with:
16+
distribution: temurin
17+
java-version: 17
18+
- name: checkout repo
19+
uses: actions/checkout@v2
20+
- name: install clj-kondo (this is quite fast)
21+
run: |
22+
curl -sLO https://raw.githubusercontent.com/clj-kondo/clj-kondo/master/script/install-clj-kondo
23+
chmod +x install-clj-kondo
24+
./install-clj-kondo --dir .
25+
- name: kondo lint
26+
run: ./clj-kondo --lint src test
27+
- name: eastwood lint
28+
run: |
29+
java -version
30+
lein eastwood

.github/workflows/lein-test.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: PR Testing
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, reopened, edited, synchronize]
7+
paths: ['src/**','test/**','project.clj']
8+
9+
jobs:
10+
pr-testing:
11+
name: PR Testing
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
version: ['11', '17']
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: checkout repo
19+
uses: actions/checkout@v3
20+
with:
21+
submodules: recursive
22+
- name: setup java
23+
uses: actions/setup-java@v3
24+
with:
25+
distribution: 'temurin'
26+
java-version: ${{ matrix.version }}
27+
- name: clojure tests
28+
run: lein test
29+
timeout-minutes: 30

project.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
:classifiers ^:replace []}}
7070

7171
:plugins [[lein-parent "0.3.7"]
72-
[puppetlabs/i18n "0.8.0"]]
72+
[jonase/eastwood "1.2.2" :exclusions [org.clojure/clojure]]
73+
[puppetlabs/i18n "0.9.2"]]
7374

7475
:main puppetlabs.trapperkeeper.main)
7576

0 commit comments

Comments
 (0)