Improved README, added basic CI CD #5
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, develop ] | ||
| pull_request: | ||
| branches: [ main ] | ||
| schedule: | ||
| # Run nightly to catch regressions | ||
| - cron: '0 0 * * *' | ||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| RUST_BACKTRACE: 1 | ||
| # TODO: Add Clippy and mock Funderberker testing | ||
| jobs: | ||
| name: Check | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| crate: | ||
| - macros | ||
| - utils | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| key: crate-${{ matrix.crate }} | ||
| - name: Check ${{ matrix.crate }} | ||
| run: cargo +nightly check --manifest-path="${{ matrix.crate }}/Cargo.toml" --verbose | ||
| unit-tests: | ||
| name: Unit Test Individual Crates | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| crate: | ||
| - macros | ||
| - utils | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| with: | ||
| key: crate-${{ matrix.crate }} | ||
| - name: Test ${{ matrix.crate }} | ||
| run: cargo +nightly test --manifest-path="${{ matrix.crate }}/Cargo.toml" --verbose | ||
| docs: | ||
| name: Documentation | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: dtolnay/rust-toolchain@stable | ||
| - uses: Swatinem/rust-cache@v2 | ||
| - name: Build docs | ||
| run: cargo doc --no-deps --all-features | ||
| - name: Deploy to GitHub Pages | ||
| if: github.ref == 'refs/heads/main' | ||
| uses: peaceiris/actions-gh-pages@v3 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| publish_dir: ./target/doc | ||