Skip to content

Commit

Permalink
Switch to mise for tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
dpassen committed May 20, 2024
1 parent 6ae8a2b commit dc680ef
Show file tree
Hide file tree
Showing 14 changed files with 123 additions and 57 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: clojure -P -X:check:test

- name: Install Task
uses: arduino/setup-task@v2
- name: Install Mise
uses: jdx/mise-action@v2
with:
experimental: true

- name: Run Reflection Checker
run: task check
run: mise run check
8 changes: 5 additions & 3 deletions .github/workflows/editorconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ jobs:
- name: Install editorconfig-checker
uses: editorconfig-checker/action-editorconfig-checker@main

- name: Install Task
uses: arduino/setup-task@v2
- name: Install Mise
uses: jdx/mise-action@v2
with:
experimental: true

- name: Run editorconfig-checker
run: task editorconfig
run: mise run editorconfig
8 changes: 5 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ jobs:
- name: Install ripgrep
run: sudo apt-get install ripgrep

- name: Install Task
uses: arduino/setup-task@v2
- name: Install Mise
uses: jdx/mise-action@v2
with:
experimental: true

- name: Run Linter
run: task lint
run: mise run lint:all
8 changes: 5 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: clojure -P -X:check:test

- name: Install Task
uses: arduino/setup-task@v2
- name: Install Mise
uses: jdx/mise-action@v2
with:
experimental: true

- name: Run Unit Tests
run: task test
run: mise run test:run
12 changes: 12 additions & 0 deletions .mise/tasks/check
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# mise description="Check for reflection using clj-check"

set -o nounset
set -o errexit
set -o pipefail

check () {
clojure -M:check
}

check
12 changes: 12 additions & 0 deletions .mise/tasks/editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# mise description="Check for editorconfig violations using editorconfig-checker"

set -o nounset
set -o errexit
set -o pipefail

editorconfig () {
editorconfig-checker
}

editorconfig
12 changes: 12 additions & 0 deletions .mise/tasks/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# mise description="Install locally"

set -o nounset
set -o errexit
set -o pipefail

install () {
clojure -T:build install
}

install
7 changes: 7 additions & 0 deletions .mise/tasks/lint/all
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# mise description="Lint source code"
# mise depends=["lint:kondo", "lint:splint"]

set -o nounset
set -o errexit
set -o pipefail
12 changes: 12 additions & 0 deletions .mise/tasks/lint/kondo
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# mise description="Lint source code using clj-kondo"

set -o nounset
set -o errexit
set -o pipefail

kondo () {
rg -tclojure -tedn --files | xargs clj-kondo --parallel --lint
}

kondo
12 changes: 12 additions & 0 deletions .mise/tasks/lint/splint
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# mise description="Lint source code using splint"

set -o nounset
set -o errexit
set -o pipefail

splint () {
clojure -M:splint
}

splint
12 changes: 12 additions & 0 deletions .mise/tasks/publish
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# mise description="Deploy to Clojars"

set -o nounset
set -o errexit
set -o pipefail

publish () {
clojure -T:build deploy
}

publish
12 changes: 12 additions & 0 deletions .mise/tasks/test/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# mise description="Run unit tests"

set -o nounset
set -o errexit
set -o pipefail

test () {
clojure -X:test
}

test
12 changes: 12 additions & 0 deletions .mise/tasks/test/watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# mise description="Watch source code and run tests accordingly"

set -o nounset
set -o errexit
set -o pipefail

test () {
clojure -X:test:watcher
}

test
45 changes: 0 additions & 45 deletions Taskfile.yaml

This file was deleted.

0 comments on commit dc680ef

Please sign in to comment.