docs: bindings #147
Workflow file for this run
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: Rust | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| rust-fmt: | |
| name: rustfmt | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly | |
| components: rustfmt | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: rust/rustfmt | |
| - name: Run Rust fmt | |
| run: cargo fmt --all -- --check | |
| toml-fmt: | |
| name: taplo | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install taplo | |
| run: | | |
| curl -L https://github.com/tamasfe/taplo/releases/latest/download/taplo-linux-x86_64.gz -o taplo.gz | |
| gunzip taplo.gz | |
| chmod +x taplo | |
| sudo mv taplo /usr/local/bin/ | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: rust/taplo | |
| - name: Run TOML fmt | |
| run: taplo fmt --check | |
| check: | |
| name: check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: rust/check | |
| - name: Run cargo check | |
| run: cargo check --workspace | |
| clippy: | |
| name: clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: clippy | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: rust/clippy | |
| - name: Build | |
| run: cargo build --workspace | |
| - name: Clippy | |
| run: cargo clippy --all-targets --all-features -- --deny warnings | |
| test: | |
| name: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: rust/test | |
| - name: Install cargo-nextest | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-nextest | |
| - name: Run tests (JUnit) | |
| run: cargo nextest run --release --profile ci | |
| - name: Publish JUnit test report | |
| if: always() | |
| uses: mikepenz/action-junit-report@v4 | |
| with: | |
| report_paths: "target/nextest/ci/junit.xml" | |
| detailed_summary: true | |
| include_passed: true | |
| - name: Setup Node.js for HTML conversion | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Convert JUnit to HTML | |
| run: npx --yes xunit-viewer -r target/nextest/ci -o target/nextest/ci/index.html | |
| - name: Upload HTML and JUnit artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: rust-test-report | |
| path: | | |
| target/nextest/ci/junit.xml | |
| target/nextest/ci/index.html | |
| doc: | |
| name: doc | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: rust/doc | |
| - name: Run cargo doc to check for warnings | |
| run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features | |
| coverage: | |
| name: coverage | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| components: llvm-tools-preview | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install cargo-llvm-cov | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Run cargo-llvm-cov | |
| run: cargo llvm-cov --all-features --workspace --html --output-dir target/coverage | |
| - name: Upload coverage to Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: target/coverage | |
| udeps: | |
| name: udeps | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: nightly | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: rust/udeps | |
| - name: Install cargo-udeps | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-udeps | |
| - name: Run cargo udeps | |
| run: cargo +nightly udeps --all-targets --workspace |