From 779fb0d814bdbbac6aab5e3ef1a59ec9597e39eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olu=CC=81was=CC=A3e=CC=80yi=CC=81=20S=CC=A3o=CC=81bande?= =?UTF-8?q?=CC=81?= Date: Mon, 12 Oct 2026 08:52:59 +0100 Subject: [PATCH 1/2] Add CI running mise run check; warm mise in the read-only lookup test --- .github/workflows/check.yml | 23 +++++++++++++++++++++++ tests/test_project_toolchains.py | 4 ++++ 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..5130acb --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,23 @@ +name: Check + +on: + pull_request: + push: + branches: [ori] + workflow_dispatch: + +permissions: + contents: read + +jobs: + check: + runs-on: macos-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - uses: jdx/mise-action@v2 + with: + install: false + # Only the tools `mise run check` and the tests use, not the whole toolkit. + - run: mise install python shellcheck gitleaks yq jq + - run: mise run check diff --git a/tests/test_project_toolchains.py b/tests/test_project_toolchains.py index 5ae3134..e18065a 100644 --- a/tests/test_project_toolchains.py +++ b/tests/test_project_toolchains.py @@ -1,6 +1,8 @@ import json +import os from pathlib import Path import shutil +import subprocess import tempfile import tomllib import unittest @@ -154,6 +156,8 @@ def test_real_mise_lookup_leaves_temporary_home_unchanged(self): binary = self.home / 'test-bin/mise' binary.unlink() binary.symlink_to(mise) + # mise records a one-time migration in its own data directory on first run; warm it so only setup's writes count. + subprocess.run([mise, '--no-config', 'where', 'java'], env=self.env, capture_output=True) before = self.snapshot() result = self.run_step('diff') self.assertIn('java@21 maven@latest', result.stdout) From 78dacbf1693614deca6e23f520212446c9ccc8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olu=CC=81was=CC=A3e=CC=80yi=CC=81=20S=CC=A3o=CC=81bande?= =?UTF-8?q?=CC=81?= Date: Mon, 12 Oct 2026 08:56:21 +0100 Subject: [PATCH 2/2] CI: install the full toolkit, as the README does --- .github/workflows/check.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 5130acb..a69e6f2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -12,12 +12,11 @@ permissions: jobs: check: runs-on: macos-latest - timeout-minutes: 15 + timeout-minutes: 30 steps: - uses: actions/checkout@v4 + # The tests expect the full toolkit, as the README's `mise install` sets it up. - uses: jdx/mise-action@v2 with: - install: false - # Only the tools `mise run check` and the tests use, not the whole toolkit. - - run: mise install python shellcheck gitleaks yq jq + cache: true - run: mise run check