Merge pull request #115 from MachineWisdomAI/automation/fava-trails-104 #577
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Supported minimum (integration floor) and current official stable. | |
| # install-jj resolves "latest" from GitHub; pin via --version for reproducibility. | |
| jj_version: ["0.28.0", "0.45.1"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: uv sync --frozen | |
| - name: Install JJ (${{ matrix.jj_version }}) | |
| run: | | |
| # Explicit pin so CI is reproducible; production default resolves GitHub latest. | |
| # Hide any preinstalled jj so we exercise the managed install path. | |
| mkdir -p "$HOME/bin-shadow" | |
| printf '#!/bin/sh\necho "shadow"\nexit 1\n' > "$HOME/bin-shadow/jj" | |
| chmod +x "$HOME/bin-shadow/jj" | |
| # Prefer empty PATH segment for jj discovery during install: | |
| hash -r || true | |
| uv run fava-trails install-jj --version "${{ matrix.jj_version }}" --force | |
| echo "$HOME/.local/bin" >> "$GITHUB_PATH" | |
| "$HOME/.local/bin/jj" --version | |
| - name: Lint | |
| run: uv run ruff check src/ tests/ | |
| - name: Run tests | |
| run: uv run pytest -v | |
| env: | |
| JJ_CONFIG: /dev/null |