Skip to content

Commit 9427da6

Browse files
committed
Integrate mise for task management
1 parent 7734746 commit 9427da6

6 files changed

Lines changed: 91 additions & 68 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v4
1313

14-
- uses: actions/setup-go@v5
15-
with:
16-
go-version: ^1.23
14+
- name: Install mise
15+
uses: jdx/mise-action@v2
1716

1817
- uses: actions/create-github-app-token@v2
1918
id: app-token
@@ -28,7 +27,7 @@ jobs:
2827
token: ${{ steps.app-token.outputs.token }}
2928

3029
- name: Build
31-
run: make build
30+
run: mise run build
3231

3332
- name: Perform CodeQL Analysis
3433
uses: github/codeql-action/analyze@v3

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ jobs:
1515
with:
1616
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/
1717

18-
- uses: actions/setup-go@v5
19-
with:
20-
go-version: ^1.23
18+
- name: Install mise
19+
uses: jdx/mise-action@v2
2120

2221
- uses: actions/create-github-app-token@v2
2322
id: app-token

.github/workflows/test.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v4
1515

16-
- uses: actions/setup-go@v5
17-
with:
18-
go-version: ^1.23
16+
- name: Install mise
17+
uses: jdx/mise-action@v2
1918

2019
- name: Run tests
21-
run: make test
20+
run: mise run test

.mise.toml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
[tools]
2+
go = "1.23"
3+
golangci-lint = "v1.42.1"
4+
5+
[tasks.mod]
6+
description = "Download and tidy Go modules"
7+
run = [
8+
"go mod download",
9+
"go mod tidy"
10+
]
11+
12+
[tasks.lint]
13+
description = "Lint all the things"
14+
run = "golangci-lint run ./..."
15+
depends = ["mod"]
16+
17+
[tasks.fix]
18+
description = "Format and fix all the things"
19+
run = "golangci-lint run --fix ./..."
20+
depends = ["mod"]
21+
22+
[tasks.fmt]
23+
description = "Alias for fix task"
24+
depends = ["fix"]
25+
26+
[tasks.build]
27+
description = "Build the application"
28+
run = "go build ."
29+
depends = ["mod"]
30+
31+
[tasks.install]
32+
description = "Install the application"
33+
run = "go install ."
34+
depends = ["mod"]
35+
36+
[tasks.clean]
37+
description = "Clean dist directory"
38+
run = "rm -fr ./dist"
39+
40+
[tasks.test]
41+
description = "Test all the things"
42+
run = "go test -race -cover ./..."
43+
depends = ["lint"]
44+
45+
[tasks.dev]
46+
description = "Run development setup"
47+
depends = ["mod", "lint"]

Makefile

Lines changed: 0 additions & 49 deletions
This file was deleted.

README.md

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,12 +287,40 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md)
287287

288288
## Local development
289289

290-
To build locally:
291-
```
292-
make build
293-
```
290+
This project uses [mise-en-place](https://mise.jdx.dev/) for development environment management. Mise automatically manages Go versions and development tools.
294291

295-
To run tests locally:
296-
```
297-
make test
298-
```
292+
### Prerequisites
293+
294+
1. Install mise-en-place:
295+
```shell
296+
# macOS
297+
brew install mise
298+
299+
# Or using curl
300+
curl https://mise.run | sh
301+
```
302+
303+
2. Install the GitHub CLI:
304+
```shell
305+
brew install gh
306+
```
307+
308+
### Getting Started
309+
310+
1. Clone the repository and navigate to the project directory
311+
2. Run `mise install` to install the required Go version and tools (defined in `.mise.toml`)
312+
3. Run `mise run dev` to set up the development environment
313+
4. Use mise tasks with `mise run <task>` to perform development operations
314+
315+
### Available Development Tasks
316+
317+
- `mise run mod` - Download and tidy Go modules
318+
- `mise run lint` - Run linting
319+
- `mise run fix` - Auto-fix linting issues
320+
- `mise run build` - Build the application
321+
- `mise run install` - Install the application locally
322+
- `mise run test` - Run tests
323+
- `mise run clean` - Clean build artifacts
324+
- `mise run dev` - Run development setup
325+
326+
All tools and dependencies are automatically managed by mise-en-place based on the `.mise.toml` configuration.

0 commit comments

Comments
 (0)