Skip to content

Commit ff05ea9

Browse files
committed
refactor(ci): Use mise tasks for consistent CI/local development
- Add 'install' task to handle dependency sync and workspace package installation - Update CI workflow to use mise-action and mise tasks - Add XML coverage output to coverage task for CI reporting
1 parent 7e19b94 commit ff05ea9

File tree

3 files changed

+31
-36
lines changed

3 files changed

+31
-36
lines changed

.config/mise/tasks/coverage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
#MISE description="Run tests with coverage report"
33
set -euo pipefail
44

5-
uv run pytest tests/ --cov=packages/morphir/src --cov=packages/morphir-tools/src --cov-report=term-missing --cov-report=html
5+
uv run pytest tests/ --cov=packages/morphir/src --cov=packages/morphir-tools/src --cov-report=term-missing --cov-report=html --cov-report=xml

.config/mise/tasks/install

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
#MISE description="Install all dependencies and workspace packages"
3+
set -euo pipefail
4+
5+
echo "Syncing dependencies..."
6+
uv sync --all-groups
7+
8+
echo "Installing workspace packages in editable mode..."
9+
uv pip install -e packages/morphir -e packages/morphir-tools
10+
11+
echo "Install complete!"

.github/workflows/ci.yml

Lines changed: 19 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,17 @@ jobs:
1717
- name: Checkout repository
1818
uses: actions/checkout@v4
1919

20-
- name: Set up uv
21-
uses: astral-sh/setup-uv@v4
22-
with:
23-
enable-cache: true
20+
- name: Set up mise
21+
uses: jdx/mise-action@v2
2422

2523
- name: Install dependencies
26-
run: uv sync --all-groups
24+
run: mise run install
2725

2826
- name: Run ruff linter
29-
run: uv run ruff check .
27+
run: mise run lint
3028

3129
- name: Check formatting
32-
run: uv run ruff format --check .
30+
run: mise run format-check
3331

3432
typecheck:
3533
name: Type Check
@@ -38,19 +36,14 @@ jobs:
3836
- name: Checkout repository
3937
uses: actions/checkout@v4
4038

41-
- name: Set up uv
42-
uses: astral-sh/setup-uv@v4
43-
with:
44-
enable-cache: true
39+
- name: Set up mise
40+
uses: jdx/mise-action@v2
4541

4642
- name: Install dependencies
47-
run: uv sync --all-groups
48-
49-
- name: Run mypy
50-
run: uv run mypy packages/morphir/src packages/morphir-tools/src
43+
run: mise run install
5144

52-
- name: Run pyright
53-
run: uv run pyright packages/morphir/src packages/morphir-tools/src
45+
- name: Run type checkers
46+
run: mise run typecheck
5447

5548
test:
5649
name: Test
@@ -59,21 +52,17 @@ jobs:
5952
- name: Checkout repository
6053
uses: actions/checkout@v4
6154

62-
- name: Set up uv
63-
uses: astral-sh/setup-uv@v4
64-
with:
65-
enable-cache: true
55+
- name: Set up mise
56+
uses: jdx/mise-action@v2
6657

6758
- name: Install dependencies
68-
run: |
69-
uv sync --all-groups
70-
uv pip install -e packages/morphir -e packages/morphir-tools
59+
run: mise run install
7160

7261
- name: Run pytest
73-
run: uv run pytest tests/ --cov=packages/morphir/src --cov=packages/morphir-tools/src --cov-report=xml
62+
run: mise run coverage
7463

7564
- name: Run behave
76-
run: uv run behave features/
65+
run: mise run test-bdd
7766

7867
- name: Upload coverage to Codecov
7968
uses: codecov/codecov-action@v4
@@ -91,16 +80,11 @@ jobs:
9180
- name: Checkout repository
9281
uses: actions/checkout@v4
9382

94-
- name: Set up uv
95-
uses: astral-sh/setup-uv@v4
96-
with:
97-
enable-cache: true
98-
99-
- name: Build morphir package
100-
run: uv build packages/morphir
83+
- name: Set up mise
84+
uses: jdx/mise-action@v2
10185

102-
- name: Build morphir-tools package
103-
run: uv build packages/morphir-tools
86+
- name: Build packages
87+
run: mise run build
10488

10589
- name: Upload artifacts
10690
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)