docs: add GitHub Actions step for cargo doc and update README.md #4
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 CI | |
| on: | |
| push: | |
| branches: [ "main", "master" ] | |
| pull_request: | |
| branches: [ "main", "master" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: Test and Format Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Install System Dependencies | |
| run: sudo apt-get update && sudo apt-get install -y clang libclang-dev | |
| - name: Check formatting | |
| run: cargo fmt --check | |
| - name: Run tests | |
| run: cargo test | |
| - name: Generate API Documentation | |
| run: cargo doc --no-deps | |
| - name: Upload Documentation Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: EntroRS-API-Docs | |
| path: target/doc/ |