docs: verify outreach targets #46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| readme-sync-check: | |
| name: README sync script check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Sync npm README from root README | |
| run: ./scripts/sync-npm-readme.sh | |
| - name: Report README drift (non-blocking) | |
| run: | | |
| set -euxo pipefail | |
| if ! git diff --quiet -- npm/tu/README.md; then | |
| echo "::notice::npm/tu/README.md differs from generated README. Release workflow auto-syncs this before npm publish." | |
| fi | |
| lint-and-test: | |
| name: Lint + Test | |
| runs-on: ubuntu-latest | |
| needs: [readme-sync-check] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache Rust build | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Format check | |
| run: cargo fmt --all --check | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: Cargo check | |
| run: cargo check --workspace --all-targets --all-features | |
| - name: Tests | |
| run: cargo test --workspace --all-targets --all-features | |
| npm-package-check: | |
| name: npm package dry-run | |
| runs-on: ubuntu-latest | |
| needs: [readme-sync-check] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Validate npm package can be published | |
| run: | | |
| set -euxo pipefail | |
| ./scripts/sync-npm-version.sh | |
| ./scripts/sync-npm-readme.sh | |
| cd npm/tu | |
| npm pack --dry-run --ignore-scripts |