Skip to content

Commit

Permalink
Check if any tests contain entrypoints that don't contain the library…
Browse files Browse the repository at this point in the history
… feature
  • Loading branch information
aumetra committed Jun 24, 2024
1 parent 2cb191c commit 61f94ad
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/doc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,30 @@ on:
workflow_dispatch:

jobs:
entrypoint-check:
name: "Extract and run entrypoint checks"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: "Install ripgrep"
run: sudo apt-get install -y ripgrep
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
docs-test-gen
- name: Extract all the tests
working-directory: ./docs-test-gen
run: cargo run
- name: Check all the extracted tests
working-directory: ./docs-test-gen/tests
run: |
for file in *; do
echo "Checking $file"
rg -q "^\s*#\[entry_point\]" $file && exit 1
done
extract-and-run:
name: "Extract and run tests"
runs-on: "ubuntu-latest"
Expand Down

0 comments on commit 61f94ad

Please sign in to comment.