jj-fork 0.2.8

Maintain a fork as jj series and glues on top of upstream, and keep them current
name: CI

on:
  push:
    branches: [main]
  pull_request:

permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: Install Rust
        run: |
          rustup toolchain install stable --profile minimal --component clippy,rustfmt --no-self-update
          rustup default stable
      - name: Install jj
        run: |
          scripts/install-jj "$HOME/.local/bin"
          echo "$HOME/.local/bin" >>"$GITHUB_PATH"
      - run: cargo fmt --check
      - run: cargo clippy --locked --all-targets -- -D warnings
      - run: cargo test --locked
      # tests/e2e.sh runs target/debug/jj-fork, which cargo test does not rebuild.
      - run: cargo build --locked
      - run: tests/e2e.sh
      - run: bash tests/transaction.sh
      - run: bash tests/native.sh
      - run: bash tests/workflow.sh
      - run: bash tests/repair.sh

  windows:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v7
      - run: cargo build --locked --release

  msrv:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: Install minimum supported Rust
        run: rustup toolchain install 1.89.0 --profile minimal --no-self-update
      - run: cargo +1.89.0 check --locked