Skip to content

Add spec-driven alignment pipeline and posttrain experiments #1404

Add spec-driven alignment pipeline and posttrain experiments

Add spec-driven alignment pipeline and posttrain experiments #1404

name: Dupekit - Tests
on:
push:
branches:
- main
paths:
- rust/dupekit/**
- pyproject.toml
- .github/workflows/dupekit-unit-tests.yaml
pull_request:
paths:
- rust/dupekit/**
- pyproject.toml
- .github/workflows/dupekit-unit-tests.yaml
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check-user-mode:
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Ensure pyproject.toml is in user mode
run: |
if grep -q 'dupekit = { path' pyproject.toml; then
echo "ERROR: pyproject.toml has dev-mode dupekit source. Run 'make rust-user' before committing."
exit 1
fi
unit-test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "rust/dupekit/uv.lock"
- name: Test dupekit
run: |
cd rust/dupekit && uv run --frozen --group test pytest tests/ -v
rust-checks:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: cargo fmt
run: cargo fmt --manifest-path rust/dupekit/Cargo.toml -- --check
- name: cargo clippy
run: cargo clippy --manifest-path rust/dupekit/Cargo.toml -- -D warnings
- name: cargo test
run: cargo test --manifest-path rust/dupekit/Cargo.toml