RAG experiments #186
This file contains 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 for Pull Requests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
crates_ci: | |
name: CI for Crates | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
# JUSTIFY: Caching based on installed packages (including git and | |
# installed tools). | |
# - Hashing based on OS (for compatibility) | |
# - Cargo.lock (for dependency changes) | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
crates/target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: cargo-bins/cargo-binstall@main | |
# JUSTIFY: Prebuilt binaries instead of compiling from scratch | |
# - Faster install for nextest | |
# - disabled telemetry (is anonymous & limited to package install popularity, but | |
# unecessary) (see readme: https://github.com/cargo-bins/cargo-binstall) | |
- name: Install nextest | |
run: cargo binstall cargo-nextest --only-signed --disable-telemetry --no-confirm | |
working-directory: crates | |
- name: Run nextest tests | |
run: cargo nextest run | |
working-directory: crates | |
- name: run doc build | |
run: cargo doc --document-private-items | |
working-directory: crates | |
- name: check formatting | |
run: cargo fmt -- --check | |
working-directory: crates | |
- name: check lint | |
run: cargo clippy | |
working-directory: crates | |
book_check: | |
name: CI for Book | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-mdbook-0.4 | |
- run: cargo install mdbook --no-default-features --vers "^0.4" --locked || echo "already installed" | |
- name: run tests | |
run: mdbook test | |
working-directory: book |