diff --git a/.github/bors.toml b/.github/bors.toml index d8997bc99f161..20c21ea828158 100644 --- a/.github/bors.toml +++ b/.github/bors.toml @@ -10,6 +10,7 @@ status = [ "check-markdown-links", "run-examples", "check-doc", + "check-missing-examples-in-docs", ] use_squash_merge = true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 661380e841c69..63a34cebab868 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,3 +152,16 @@ jobs: - name: Checks dead links run: cargo deadlinks --dir target/doc/bevy continue-on-error: true + + check-missing-examples-in-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Check that examples are present in both README and Cargo + uses: Weibye/action-internal-link-consistency@1.0.0 + with: + source: './examples/' + targets: '[ "./Cargo.toml", "./examples/README.md" ]' + file-types: '[".rs"]' + exclude-folders: '["./examples/ios"]' + exclude-files: '[]' diff --git a/examples/README.md b/examples/README.md index 608f5ed5b09f0..e3b8878c136f0 100644 --- a/examples/README.md +++ b/examples/README.md @@ -72,7 +72,7 @@ git checkout v0.4.0 ## Hello, World! -Example | Main | Description +Example | File | Description --- | --- | --- `hello_world` | [`hello_world.rs`](./hello_world.rs) | Runs a minimal example that outputs "hello world" @@ -80,7 +80,7 @@ Example | Main | Description ## 2D Rendering -Example | Main | Description +Example | File | Description --- | --- | --- `contributors` | [`2d/contributors.rs`](./2d/contributors.rs) | Displays each contributor as a bouncy bevy-ball! `many_sprites` | [`2d/many_sprites.rs`](./2d/many_sprites.rs) | Displays many sprites in a grid arragement! Used for performance testing. @@ -197,10 +197,10 @@ Example | File | Description Example | File | Description --- | --- | --- -`reflection` | [`reflection/reflection.rs`](reflection/reflection.rs) | Demonstrates how reflection in Bevy provides a way to dynamically interact with Rust types -`generic_reflection` | [`reflection/generic_reflection.rs`](reflection/generic_reflection.rs) | Registers concrete instances of generic types that may be used with reflection -`reflection_types` | [`reflection/reflection_types.rs`](reflection/reflection_types.rs) | Illustrates the various reflection types available -`trait_reflection` | [`reflection/trait_reflection.rs`](reflection/trait_reflection.rs) | Allows reflection with trait objects +`reflection` | [`reflection/reflection.rs`](./reflection/reflection.rs) | Demonstrates how reflection in Bevy provides a way to dynamically interact with Rust types +`generic_reflection` | [`reflection/generic_reflection.rs`](./reflection/generic_reflection.rs) | Registers concrete instances of generic types that may be used with reflection +`reflection_types` | [`reflection/reflection_types.rs`](./reflection/reflection_types.rs) | Illustrates the various reflection types available +`trait_reflection` | [`reflection/trait_reflection.rs`](./reflection/trait_reflection.rs) | Allows reflection with trait objects ## Scene