diff --git a/.github/workflows/external-types.yml b/.github/workflows/external-types.yml deleted file mode 100644 index 041b7f6..0000000 --- a/.github/workflows/external-types.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: External Types - -on: - pull_request: - types: [opened, synchronize, reopened] - push: - branches: [main] - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - check-external-types: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Install cargo-check-external-types,just - uses: taiki-e/install-action@6a1bd70eaac3c8bdf093356838d7ee09fda951cf # v2.85.5 - with: - tool: cargo-check-external-types,just - - - name: Install Nix - uses: nixbuild/nix-quick-install-action@9f63be77f412a248c9d9a65a4c82cf066cdf8f0c # v35 - - - name: Enter Nix devshell - uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1 - with: - arguments: .#ci - - - name: Resolve external types toolchain - id: toolchain - run: echo "toolchain=$(just --evaluate external-types-toolchain)" >> "$GITHUB_OUTPUT" - - - name: Install Rust - uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0 - with: - toolchain: ${{ steps.toolchain.outputs.toolchain }} - - - name: Check external types - run: just check-external-types diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 32d2312..16ef9f9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -72,3 +72,13 @@ jobs: env: RUSTDOCFLAGS: "-D warnings" run: cargo doc --no-deps --all-features --workspace + + external-types: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - uses: x52dev/actions/cargo-workspace-check-external-types@8dc0274800321d780097bc9b3b1ffa9f8dfb1e8b diff --git a/justfile b/justfile index 77c32f8..5217eff 100644 --- a/justfile +++ b/justfile @@ -4,7 +4,6 @@ _list: @just --list toolchain := "" -external-types-toolchain := "nightly-2026-03-20" # Format project fmt: just --unstable --fmt @@ -22,18 +21,6 @@ check: fd --hidden -e=toml --exec-batch taplo lint cargo shear -[private] -workspace-crate-manifests: - @cargo metadata --no-deps --format-version=1 \ - | jq -r '(.workspace_root + "/") as $root | .workspace_members as $members | .packages[] | select(.id as $id | $members | index($id)) | .manifest_path | ltrimstr($root)' - -# Check crates are not leaking unexpected external types -check-external-types: - just workspace-crate-manifests \ - | while IFS= read -r manifest; do \ - cargo +{{ external-types-toolchain }} check-external-types --manifest-path "$manifest"; \ - done - # Lint workspace with Clippy clippy: cargo {{ toolchain }} clippy --workspace --all-targets --all-features