diff --git a/.github/workflows/doc-test.yml b/.github/workflows/doc-test.yml index fbbf4127..48605f1f 100644 --- a/.github/workflows/doc-test.yml +++ b/.github/workflows/doc-test.yml @@ -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"