Skip to content

Commit c043cc1

Browse files
committed
Check external types in public API
1 parent c74b4fd commit c043cc1

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

.external-types.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# cargo-check-external-types configuration
2+
# https://crates.io/crates/cargo-check-external-types
3+
4+
# The following are external types that are allowed to be exposed in our public API.
5+
allowed_external_types = []

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,18 @@ jobs:
6969
- uses: dtolnay/rust-toolchain@nightly
7070
- run: cargo doc --workspace --all-features --document-private-items
7171

72+
check-external-types:
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/checkout@v3
76+
with:
77+
persist-credentials: false
78+
- uses: dtolnay/rust-toolchain@v1
79+
with:
80+
toolchain: nightly-2022-07-26
81+
- run: cargo install cargo-check-external-types --locked --version 0.1.3
82+
- run: cargo check-external-types --all-features --config .external-types.toml
83+
7284
tidy:
7385
runs-on: ubuntu-latest
7486
steps:
@@ -98,7 +110,7 @@ jobs:
98110
ci-success:
99111
name: ci
100112
if: github.event_name == 'push' && success()
101-
needs: [test, msrv, docs, tidy] # tidy:needs
113+
needs: [test, msrv, docs, check-external-types, tidy] # tidy:needs
102114
runs-on: ubuntu-latest
103115
steps:
104116
- name: Mark the job as a success

0 commit comments

Comments
 (0)