fix: correct mise.toml syntax in tests

The [env.preview] syntax is not valid in mise. Changed tests to use
standard [env] section with regular environment variables instead of
attempting to use environment-specific sections which require separate
config files (mise.preview.toml).
This commit is contained in:
Jorge Rodriguez 2026-04-21 10:07:13 +02:00
parent 121c4fdeaf
commit 05a978cac3
No known key found for this signature in database
GPG key ID: A22D46F0D97D588A

View file

@ -161,8 +161,8 @@ jobs:
[tools]
jq = "1.7.1"
[env.preview]
PREVIEW_VAR = "preview-value"
[env]
TEST_VAR = "test-value"
- name: Verify MISE_ENV is set in subsequent steps
run: |
@ -174,11 +174,11 @@ jobs:
- name: Verify mise environment variables are loaded
run: |
if [ "$PREVIEW_VAR" != "preview-value" ]; then
echo "Environment-specific variable not loaded: got '$PREVIEW_VAR'"
if [ "$TEST_VAR" != "test-value" ]; then
echo "Environment variable not loaded: got '$TEST_VAR'"
exit 1
fi
echo "✓ Environment-specific variables loaded correctly"
echo "✓ Environment variables loaded correctly"
# Test 2: MISE_ENV environment variable takes precedence
- name: Setup mise with both env var and input
@ -189,7 +189,7 @@ jobs:
[tools]
jq = "1.7.1"
[env.production]
[env]
PROD_VAR = "production-value"
env:
MISE_ENV: production
@ -202,13 +202,13 @@ jobs:
fi
echo "✓ Existing MISE_ENV correctly took precedence"
- name: Verify production environment is active
- name: Verify environment variables are loaded
run: |
if [ "$PROD_VAR" != "production-value" ]; then
echo "Production environment not active: got '$PROD_VAR'"
echo "Environment variable not loaded: got '$PROD_VAR'"
exit 1
fi
echo "✓ Production environment correctly active"
echo "✓ Environment variables loaded correctly"
# Test 3: Cache key includes environment
- name: Setup mise with environment (cache test)