Add backup API for embedded and managed server modes #43
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-test-lint: | |
| name: Build/Test/Lint (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| - windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Normalize line endings on Windows | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: | | |
| git config --local core.autocrlf false | |
| git config --local core.eol lf | |
| git reset --hard HEAD | |
| - name: Set up Go | |
| uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7 # stable (pinned snapshot) | |
| with: | |
| components: clippy | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 | |
| with: | |
| workspaces: "shim -> target" | |
| - name: Set up protoc | |
| uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
| with: | |
| version: "31.x" | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Verify protoc | |
| run: protoc --version | |
| - name: Build Rust shim (debug) | |
| working-directory: shim | |
| run: cargo build --locked | |
| - name: Run Go tests | |
| shell: pwsh | |
| run: | | |
| $libName = switch ("${{ runner.os }}") { | |
| "Linux" { "libchroma_go_shim.so" } | |
| "macOS" { "libchroma_go_shim.dylib" } | |
| "Windows" { "chroma_go_shim.dll" } | |
| default { throw "Unsupported OS: ${{ runner.os }}" } | |
| } | |
| $env:CHROMA_LIB_PATH = [System.IO.Path]::GetFullPath((Join-Path $env:GITHUB_WORKSPACE "shim/target/debug/$libName")) | |
| Write-Host "CHROMA_LIB_PATH=$env:CHROMA_LIB_PATH" | |
| go test -v ./... | |
| - name: Run Go lint | |
| uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 | |
| with: | |
| version: latest | |
| args: --timeout=30m ./... | |
| - name: Run Rust lint | |
| working-directory: shim | |
| run: cargo clippy --locked -- -D warnings |