Add with_top_k to CosineSimilarity #649
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: Lint checks | |
| on: | |
| push: | |
| branches: [ main, development ] | |
| pull_request: | |
| branches: [ development ] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| env: | |
| TZ: "/usr/share/zoneinfo/your/location" | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Cache .cargo and target | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo | |
| ./target | |
| key: ${{ runner.os }}-lint-cargo-${{ hashFiles('**/Cargo.toml') }} | |
| restore-keys: ${{ runner.os }}-lint-cargo-${{ hashFiles('**/Cargo.toml') }} | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| default: true | |
| - run: rustup component add rustfmt | |
| - name: Check formt | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: fmt | |
| args: --all -- --check | |
| - run: rustup component add clippy | |
| - name: Run clippy | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: clippy | |
| args: --all-features -- -Drust-2018-idioms -Dwarnings |