Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to mise for tasks #72

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Switch to mise for tasks
  • Loading branch information
dpassen committed May 20, 2024
commit e90b549d2131c49055cb8fbf60f16da54875d3ce
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/format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ jobs:
with:
poetry-version: "1.8.3"

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

- name: Install optional
run: poetry install

- name: Run Formatter
run: task format
run: mise run format
8 changes: 5 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ jobs:
with:
poetry-version: "1.8.3"

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

- name: Install optional
run: poetry install

- name: Run Linter
run: task lint
run: mise run lint
8 changes: 5 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ jobs:
with:
poetry-version: "1.8.3"

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

- name: Install optional
run: poetry install

- name: Run Unit Tests
run: task test
run: mise run test
8 changes: 5 additions & 3 deletions .github/workflows/typecheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ jobs:
with:
poetry-version: "1.8.3"

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

- name: Install optional
run: poetry install

- name: Run Type Checker
run: task typecheck
run: mise run typecheck
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/format
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# mise description="Format code using ruff"

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

format () {
poetry run python -m ruff format optional tests
}

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

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

lint () {
poetry run python -m ruff check optional tests
}

lint
12 changes: 12 additions & 0 deletions .mise/tasks/test
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 () {
poetry run python -m pytest
}

test
12 changes: 12 additions & 0 deletions .mise/tasks/typecheck
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# mise description="Check types using mypy"

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

typecheck () {
poetry run python -m mypy optional tests
}

typecheck
27 changes: 0 additions & 27 deletions Taskfile.yaml

This file was deleted.