-
Notifications
You must be signed in to change notification settings - Fork 0
Merge remaining tox/pytest/MSRV work (#31) into main #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
240849f
5478e81
b3c324d
e996a68
f614a3a
52ab6b1
720f964
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,10 @@ on: | |
| - 'rust/**' | ||
| - 'agents/**' | ||
| - 'tools/**' | ||
| - 'tests/**' | ||
| - 'scripts/**' | ||
| - 'tox.ini' | ||
| - 'pyproject.toml' | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
|
@@ -21,7 +24,10 @@ on: | |
| - 'rust/**' | ||
| - 'agents/**' | ||
| - 'tools/**' | ||
| - 'tests/**' | ||
| - 'scripts/**' | ||
| - 'tox.ini' | ||
| - 'pyproject.toml' | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
|
|
@@ -50,6 +56,50 @@ jobs: | |
| - name: Check agent MD files | ||
| run: bash scripts/validate-agents.sh | ||
|
|
||
| # ── Job: Python tests (tox, version matrix) ────────────────────────────────── | ||
| python-tests: | ||
| name: Python tests (${{ matrix.python-version }}) | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: . | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
|
|
||
| - name: Install tox | ||
| run: pip install tox | ||
|
|
||
| - name: Run tests | ||
| run: tox -e py | ||
|
|
||
| # ── Job: Python lint/format (ruff via tox) ─────────────────────────────────── | ||
| python-lint: | ||
| name: Python lint (ruff) | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: . | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.13" | ||
|
|
||
| - name: Install tox | ||
| run: pip install tox | ||
|
|
||
| - name: Lint + format check | ||
| run: tox -e lint,fmt-check | ||
|
|
||
| # ── Job: rustfmt ───────────────────────────────────────────────────────────── | ||
| fmt: | ||
| name: cargo fmt | ||
|
|
@@ -102,6 +152,26 @@ jobs: | |
| - name: Run workspace tests | ||
| run: cargo test --workspace | ||
|
|
||
| # ── Job: MSRV verification ──────────────────────────────────────────────────── | ||
| msrv: | ||
| name: MSRV verify | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| workspaces: rust -> target | ||
|
|
||
| - name: Install cargo-msrv | ||
| run: cargo install cargo-msrv --locked | ||
|
|
||
| - name: Discover the real MSRV | ||
| working-directory: rust/claude-tools | ||
| run: cargo msrv find | ||
|
Comment on lines
+171
to
+173
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🌐 Web query:
💡 Result: In cargo-msrv, the primary behavioral difference between find and verify lies in their objective: - cargo msrv find is used to discover what the minimum supported Rust version (MSRV) of a project is [1][2][3]. It performs a search (binary or linear) across available Rust toolchains to identify the earliest toolchain that satisfies the project's requirements [3]. - cargo msrv verify is used to confirm whether a project is compatible with a pre-defined MSRV, typically one already specified in the project's Cargo.toml manifest (via package.rust-version or package.metadata.msrv) [1][2][4]. It does not perform a search; instead, it runs a single compatibility check against the specified version and returns success (exit code 0) or failure (non-zero exit code) [1][4]. Regarding your second question: No, cargo msrv find does not fail specifically because the discovered MSRV differs from the package.rust-version in Cargo.toml. The purpose of cargo msrv find is to independently determine the MSRV based on the project's actual compatibility [3]. If you run cargo msrv find and the resulting MSRV does not match the version currently written in your Cargo.toml, the tool simply reports the newly discovered version (and can optionally update the manifest if the --write-msrv flag is used) [5][3]. The tool treats the discovery process as an independent assessment of compatibility [3]. If you want to check for discrepancies, you would typically use cargo msrv verify, which evaluates whether the currently defined MSRV is still valid [4]. Citations:
🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- workflow context ---'
sed -n '145,185p' .github/workflows/ci.yml
printf '%s\n' '--- MSRV declarations and cargo-msrv setup ---'
rg -n -C 3 'cargo-msrv|msrv|rust-version' .github/workflows/ci.yml rust/claude-tools/Cargo.tomlRepository: BcKmini/claude-code-use Length of output: 2750 선언된 MSRV를 검증하세요.
🤖 Prompt for AI Agents |
||
|
|
||
| # ── Job: Windows smoke build ───────────────────────────────────────────────── | ||
| windows-smoke: | ||
| name: Windows build smoke | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -73,8 +73,11 @@ install-rust: build ## Build Rust binary and install to ~/.local/bin/ | |||||||||||||||||||||
| @echo "Installed claude-tools → $(BIN_TARGET)/claude-tools" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| # ─── test ────────────────────────────────────────────────────────────────── | ||||||||||||||||||||||
| .PHONY: test test-rust test-python test-agents | ||||||||||||||||||||||
| test: test-rust test-python ## Run all tests | ||||||||||||||||||||||
| .PHONY: test test-rust test-python test-agents tox | ||||||||||||||||||||||
| test: test-rust test-python ## Run all tests (fast, zero-dependency smoke checks) | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| tox: ## Full Python test matrix + lint (requires: pip install tox ruff) | ||||||||||||||||||||||
| tox | ||||||||||||||||||||||
|
Comment on lines
+76
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
수정 예시-.PHONY: test test-rust test-python test-agents tox
+.PHONY: test test-rust test-python test-agents tox msrv📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| test-rust: ## Cargo check + clippy | ||||||||||||||||||||||
| cd $(RUST_DIR) && $(CARGO) check | ||||||||||||||||||||||
|
|
@@ -113,6 +116,9 @@ test-agents: ## Verify agent files exist and are non-empty | |||||||||||||||||||||
| lint: ## Clippy lint (Rust) | ||||||||||||||||||||||
| cd $(RUST_DIR) && $(CARGO) clippy -- -D warnings | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| msrv: ## Verify the crate builds on its declared MSRV (requires: cargo install cargo-msrv) | ||||||||||||||||||||||
| cd $(RUST_DIR)/claude-tools && cargo msrv verify | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| fmt: ## Format all code (Rust + Python) | ||||||||||||||||||||||
| bash scripts/fmt.sh | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| [tool.ruff] | ||
| line-length = 100 | ||
| target-version = "py38" | ||
|
|
||
| [tool.ruff.lint] | ||
| # E402 ignored: every tool in tools/ deliberately puts a VERSION constant | ||
| # right after the module docstring, before imports, for easy `grep`. | ||
| select = ["E", "F", "I", "UP"] | ||
| ignore = ["E501", "E402"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: BcKmini/claude-code-use
Length of output: 1987
🏁 Script executed:
Repository: BcKmini/claude-code-use
Length of output: 7137
🏁 Script executed:
Repository: BcKmini/claude-code-use
Length of output: 626
🏁 Script executed:
Repository: BcKmini/claude-code-use
Length of output: 514
모든
actions/checkout단계에서 토큰 지속 저장을 비활성화하세요.9개 checkout 단계(54, 71, 91, 108, 126, 144, 160, 184, 214행)에
persist-credentials: false를 추가하세요. 각 작업은 checkout 후 저장소 제어 코드를 실행하므로, 지속된 토큰을 읽을 수 있습니다. 또한 최상위에permissions: contents: read를 설정하세요.🧰 Tools
🪛 zizmor (1.29.0)
[warning] 71-71: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
📍 Affects 1 file
.github/workflows/ci.yml#L71-L71(this comment).github/workflows/ci.yml#L91-L91.github/workflows/ci.yml#L160-L160🤖 Prompt for AI Agents
Source: Linters/SAST tools