Skip to content
Open
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
43 changes: 43 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Rust

on:
pull_request:
push:
branches: [main]
workflow_dispatch:

# Cancel in-progress runs on same PR/branch
concurrency:
group: rust-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
working-directory: providers/workspaces/interactive-tmux/driver-rs

jobs:
itmux:
name: itmux (fmt, clippy, test)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.3

- name: Install Rust (stable)
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: clippy, rustfmt

- name: Setup Rust cache
uses: Swatinem/rust-cache@v2.9.1
with:
workspaces: "providers/workspaces/interactive-tmux/driver-rs -> target"

- name: Check formatting
run: cargo fmt -- --check

- name: Lint
run: cargo clippy --all-targets -- -D warnings

- name: Run tests
run: cargo test
39 changes: 35 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,29 +114,60 @@ python-test-integration:
uv run python scripts/python_qa.py test --integration
@echo '{{ GREEN }}✓ Python integration tests passed{{ NORMAL }}'

# ═══════════════════════════════════════════════════════════════════════════════
# RUST (itmux driver)
# ═══════════════════════════════════════════════════════════════════════════════

# Run itmux Rust tests
[group('rust')]
rust-test:
@echo '{{ YELLOW }}Running itmux Rust tests...{{ NORMAL }}'
cd providers/workspaces/interactive-tmux/driver-rs && cargo test
@echo '{{ GREEN }}✓ itmux Rust tests passed{{ NORMAL }}'

# Lint itmux Rust code
[group('rust')]
rust-lint:
@echo '{{ YELLOW }}Linting itmux Rust code...{{ NORMAL }}'
cd providers/workspaces/interactive-tmux/driver-rs && cargo clippy --all-targets -- -D warnings
@echo '{{ GREEN }}✓ itmux Rust linting complete{{ NORMAL }}'

# Check itmux Rust formatting
[group('rust')]
rust-fmt-check:
@echo '{{ YELLOW }}Checking itmux Rust formatting...{{ NORMAL }}'
cd providers/workspaces/interactive-tmux/driver-rs && cargo fmt -- --check

# Format itmux Rust code
[group('rust')]
rust-fmt:
@echo '{{ YELLOW }}Formatting itmux Rust code...{{ NORMAL }}'
cd providers/workspaces/interactive-tmux/driver-rs && cargo fmt
@echo '{{ GREEN }}✓ itmux Rust formatting complete{{ NORMAL }}'

# ═══════════════════════════════════════════════════════════════════════════════
# COMBINED OPERATIONS
# ═══════════════════════════════════════════════════════════════════════════════

# Format all code
[group('all')]
fmt: python-fmt
fmt: python-fmt rust-fmt

# Check all formatting
[group('all')]
fmt-check: python-fmt-check
fmt-check: python-fmt-check rust-fmt-check

# Lint all code
[group('all')]
lint: python-lint
lint: python-lint rust-lint

# Auto-fix linting issues
[group('all')]
lint-fix: python-lint-fix

# Run all tests
[group('all')]
test: python-test
test: python-test rust-test

# ═══════════════════════════════════════════════════════════════════════════════
# QUALITY ASSURANCE
Expand Down
Loading
Loading