on: workflow_call: inputs: code-changed: required: true type: string save-rust-cache: required: false type: string default: "true" permissions: {} env: CARGO_INCREMENTAL: 0 CARGO_NET_RETRY: 10 CARGO_TERM_COLOR: always RUSTUP_MAX_RETRIES: 10 jobs: ruff: timeout-minutes: 10 runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: "Install uv" uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1 with: version: "0.10.7" - run: uvx ruff check . ty: timeout-minutes: 10 runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: "Install uv" uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1 with: version: "0.10.7" - run: | uvx ty check python/uv uvx \ --directory crates/uv-python \ --with-requirements fetch-download-metadata.py \ ty check --python-version 3.13 fetch-download-metadata.py shellcheck: timeout-minutes: 10 runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: "Install shellcheck" run: | # renovate: datasource=github-releases depName=koalaman/shellcheck SHELLCHECK_VERSION="v0.11.0" curl -sSL "https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar -xJf - sudo mv "shellcheck-${SHELLCHECK_VERSION}/shellcheck" /usr/local/bin/ - name: "Run shellcheck" run: find . -name '*.sh' -type f | xargs shellcheck --shell bash --severity style validate-pyproject: timeout-minutes: 10 runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: "Install uv" uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1 with: version: "0.10.7" - run: uvx --from 'validate-pyproject[all,store]' validate-pyproject pyproject.toml readme: timeout-minutes: 10 runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: 3.12 - run: python scripts/transform_readme.py --target pypi clippy-ubuntu: name: "clippy on linux" timeout-minutes: 10 if: ${{ inputs.code-changed == 'true' || github.ref == 'refs/heads/main' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 with: save-if: ${{ inputs.save-rust-cache == 'true' }} - name: "Check uv_build dependencies" uses: EmbarkStudios/cargo-deny-action@3fd3802e88374d3fe9159b834c7714ec57d6c979 # v2.0.15 with: command: check bans manifest-path: crates/uv-build/Cargo.toml - name: "Install Rust toolchain" run: rustup component add clippy - name: "Clippy" run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings clippy-windows: name: "clippy on windows" timeout-minutes: 15 if: ${{ inputs.code-changed == 'true' || github.ref == 'refs/heads/main' }} runs-on: windows-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: Setup Dev Drive run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1 # actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone... - name: Copy Git Repo to Dev Drive run: | Copy-Item -Path "${{ github.workspace }}" -Destination "$Env:UV_WORKSPACE" -Recurse - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 with: workspaces: ${{ env.UV_WORKSPACE }} save-if: ${{ inputs.save-rust-cache == 'true' }} - name: "Install Rust toolchain" run: rustup component add clippy - name: "Clippy" working-directory: ${{ env.UV_WORKSPACE }} run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings shear: name: "cargo shear" timeout-minutes: 10 runs-on: ubuntu-latest steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: "Install cargo shear" uses: taiki-e/install-action@542cebaaed782771e619bd5609d97659d109c492 # v2.66.7 with: tool: cargo-shear - run: cargo shear typos: runs-on: ubuntu-slim steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - uses: crate-ci/typos@57b11c6b7e54c402ccd9cda953f1072ec4f78e33 # v1.43.5