Skip to content

Commit

Permalink
ci: add cargo-check-external-types
Browse files Browse the repository at this point in the history
  • Loading branch information
cpu authored and chifflier committed Apr 12, 2024
1 parent a594530 commit 167f73b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,17 @@ jobs:
uses: actions/checkout@v4
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2

check-external-types:
name: Validate external types appearing in public API
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2024-02-07
# ^ sync with https://github.com/awslabs/cargo-check-external-types/blob/main/rust-toolchain.toml
- run: cargo install cargo-check-external-types
- run: cargo check-external-types
7 changes: 7 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@ hex-literal = "0.4"

[badges]
travis-ci = { repository = "rusticata/pcap-parser" }

[package.metadata.cargo_check_external_types]
allowed_external_types = [
"nom",
"nom::*",
"circular::Buffer",
]

0 comments on commit 167f73b

Please sign in to comment.