Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/base-demo-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,23 @@ jobs:
printf ' enabled: false\n'
} >> "$HOME/.base.d/config.yaml"

- name: Install mise for selected project trust
run: |
set -euo pipefail
if ! command -v mise >/dev/null 2>&1; then
if [[ "$RUNNER_OS" == "macOS" ]]; then
brew install mise
else
installer="$RUNNER_TEMP/mise-install.sh"
curl --fail --silent --show-error --location https://mise.run --output "$installer"
sh "$installer"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
export PATH="$HOME/.local/bin:$PATH"
fi
fi
command -v mise
mise --version

- name: Trust the selected base-demo mise configuration
env:
BASE_DEMO_ROOT: ${{ github.workspace }}/../base-demo
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/ecosystem-release-bom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,23 @@ jobs:
if: matrix.platform == 'macos-14'
run: ./bin/basectl setup --ci base --format json

- name: Install mise for selected project trust
run: |
set -euo pipefail
if ! command -v mise >/dev/null 2>&1; then
if [[ "$RUNNER_OS" == "macOS" ]]; then
brew install mise
else
installer="$RUNNER_TEMP/mise-install.sh"
curl --fail --silent --show-error --location https://mise.run --output "$installer"
sh "$installer"
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
export PATH="$HOME/.local/bin:$PATH"
fi
fi
command -v mise
mise --version

- name: Trust the selected base-demo mise configuration
run: |
set -euo pipefail
Expand Down
20 changes: 20 additions & 0 deletions tests/test_github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,11 @@ def test_base_demo_e2e_workflow_covers_the_external_project_loop() -> None:
assert job["env"]["BASE_DEMO_FULL_VALIDATION"] == "1"
assert job["env"]["BASE_CLI_SOURCE_DIR"].endswith(".dependencies/base-cli/lib/python")

install_mise_step_index = next(
index
for index, step in enumerate(steps)
if isinstance(step, dict) and step.get("name") == "Install mise for selected project trust"
)
trust_step_index = next(
index
for index, step in enumerate(steps)
Expand All @@ -371,6 +376,11 @@ def test_base_demo_e2e_workflow_covers_the_external_project_loop() -> None:
for index, step in enumerate(steps)
if isinstance(step, dict) and "basectl setup --ci base-demo" in step.get("run", "")
)
assert install_mise_step_index < trust_step_index < setup_step_index
assert "brew install mise" in steps[install_mise_step_index]["run"]
assert "https://mise.run" in steps[install_mise_step_index]["run"]
assert "command -v mise" in steps[install_mise_step_index]["run"]
assert "mise --version" in steps[install_mise_step_index]["run"]
assert trust_step_index < setup_step_index
assert 'mise trust "$mise_config"' in steps[trust_step_index]["run"]

Expand Down Expand Up @@ -413,6 +423,11 @@ def test_base_demo_e2e_workflow_covers_the_external_project_loop() -> None:
bom_workflow = load_workflow(ECOSYSTEM_RELEASE_BOM_WORKFLOW)
bom_compatibility = bom_workflow["jobs"]["compatibility"]
bom_steps = bom_compatibility["steps"]
bom_install_mise_step_index = next(
index
for index, step in enumerate(bom_steps)
if isinstance(step, dict) and step.get("name") == "Install mise for selected project trust"
)
bom_trust_step_index = next(
index
for index, step in enumerate(bom_steps)
Expand All @@ -423,6 +438,11 @@ def test_base_demo_e2e_workflow_covers_the_external_project_loop() -> None:
for index, step in enumerate(bom_steps)
if isinstance(step, dict) and "basectl setup --ci base-demo" in step.get("run", "")
)
assert bom_install_mise_step_index < bom_trust_step_index < bom_setup_step_index
assert "brew install mise" in bom_steps[bom_install_mise_step_index]["run"]
assert "https://mise.run" in bom_steps[bom_install_mise_step_index]["run"]
assert "command -v mise" in bom_steps[bom_install_mise_step_index]["run"]
assert "mise --version" in bom_steps[bom_install_mise_step_index]["run"]
assert bom_trust_step_index < bom_setup_step_index
assert 'mise trust "$mise_config"' in bom_steps[bom_trust_step_index]["run"]

Expand Down
Loading