Skip to content

Commit 6311a38

Browse files
committed
build: switch to mise 'mono-repo'
1 parent e33ab97 commit 6311a38

File tree

9 files changed

+98
-93
lines changed

9 files changed

+98
-93
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ jobs:
2929
- uses: actions/checkout@v5
3030
- uses: mozilla-actions/[email protected]
3131
- uses: jdx/mise-action@v3
32-
- run: mise run --jobs 1 ci
32+
- run: mise run --jobs 1 :ci
3333
shell: bash

.mise.toml

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

CONTRIBUTING.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,36 @@ The repository is composed of multiple subfolders / modules.
4747
mise install
4848

4949
# to have list of tasks
50-
mise tasks
50+
mise tasks --all
5151

5252
# to run a task
5353
mise run {{task}}
5454

5555
# to run the CI tasks
56-
mise run ci
56+
mise run :ci
5757
```
5858

5959
## How to test
6060

6161
```bash
62-
mise run test
62+
mise run :test
6363
```
6464

65-
## How to release
65+
OR for a specific sub module
6666

67-
???
67+
```bash
68+
mise run '//submodule:test'
69+
70+
# OR
71+
72+
cd submodule
73+
mise run :test
74+
```
75+
76+
To review test (and accept/reject changes in output)
77+
78+
```bash
79+
mise run '//submodule:test' --mode review
80+
```
6881

6982
[issue]: https://github.com/cdviz-dev/cdviz-collector/issues "CDviz collector's issue tracker"

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,20 @@ Each transformer includes sample inputs and expected outputs for testing:
4848

4949
```bash
5050
# Test all transformers
51-
mise run test
51+
mise run :test
5252

5353
# Test specific transformer
54-
mise run test:transform:github_events
54+
mise run //github_events:test
5555

5656
# Review and update expected outputs
57-
mise run test:transform:github_events -- --mode review
57+
mise run //github_events:test -- --mode review
5858
```
5959

6060
### Code Style
6161

6262
```bash
6363
# Format code
64-
mise run format
64+
mise run :format
6565
```
6666

6767
See [AGENTS.md](./AGENTS.md) for detailed guidelines on code style and conventions.
@@ -75,8 +75,7 @@ Contributions are welcome! Each transformer should include:
7575
- `inputs/` - Sample input events
7676
- `outputs/` - Expected output CDEvents
7777
- `README.md` - Documentation with usage examples
78-
79-
And a command into the `.mise.toml` to test/review the transformer against its inputs.
78+
- `mise.toml` - Task to test/review the transformer against its inputs.
8079

8180
## License
8281

argocd_notifications/mise.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[tasks."test"]
2+
description = "run the transformation example argocd_notifications (use `--mode review` to review and update)"
3+
run = """cdviz-collector \
4+
transform \
5+
--disable-otel \
6+
--mode {{option(name="mode", default="check")}} \
7+
--config ./cdviz-collector.toml \
8+
-t argocd_metadata,argocd_notifications \
9+
--input ./inputs \
10+
--output ./outputs
11+
"""

github_events/mise.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[tasks."test"]
2+
description = "run the transformation example github_events (use `--mode review` to review and update)"
3+
run = """cdviz-collector \
4+
transform \
5+
--disable-otel \
6+
--mode {{option(name="mode", default="check")}} \
7+
--config ./cdviz-collector.toml \
8+
-t github_events \
9+
--input ./inputs \
10+
--output ./outputs
11+
"""

kubewatch_cloudevents/mise.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[tasks."test"]
2+
description = "run the transformation example kubewatch_cloudevents (cloudevents) (use `--mode review` to review and update)"
3+
run = """cdviz-collector \
4+
transform \
5+
--disable-otel \
6+
--mode {{option(name="mode", default="check")}} \
7+
--config ./cdviz-collector.toml \
8+
-t kubewatch_metadata,kubewatch_cloudevents \
9+
--input ./inputs \
10+
--output ./outputs
11+
"""

mise.toml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# CDviz Monorepo Configuration
2+
min_version = "2025.10.6" # "2025.9.7"
3+
experimental_monorepo_root = true
4+
5+
[settings]
6+
experimental = true
7+
8+
[tools]
9+
"dprint" = "latest"
10+
"ubi:davidB/json-simple-obfuscator" = "latest"
11+
"ubi:cdviz-dev/cdviz-collector" = "latest"
12+
13+
[tasks."format"]
14+
alias = "fmt"
15+
depends = [":obfuscate"]
16+
description = "Format the code and sort dependencies"
17+
run = "dprint fmt"
18+
19+
[tasks.obfuscate]
20+
description = "obfuscate some data into the samples"
21+
run = "json-simple-obfuscator */inputs/*/*.json"
22+
23+
[tasks."test"]
24+
description = "run all 'test' tasks of sub module"
25+
depends = ["//...:test"]
26+
27+
[tasks."ci"]
28+
depends = [":test"]
29+
run = "cdviz-collector --version"
30+
description = "set of tasks run by CI"

passthrough/mise.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[tasks."test"]
2+
description = "run the transformation example passthrough (use `--mode review` to review and update)"
3+
run = """cdviz-collector \
4+
transform \
5+
--disable-otel \
6+
--mode {{option(name="mode", default="check")}} \
7+
--config ./cdviz-collector.toml \
8+
-t passthrough \
9+
--input ./inputs \
10+
--output ./outputs
11+
"""

0 commit comments

Comments
 (0)