Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 44 additions & 3 deletions .github/workflows/build-nuget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,50 @@ jobs:
path: ./nuget-package/*.nupkg

- name: Publish to GitHub Packages
# Only publish when a tag starting with 'v' is pushed
if: startsWith(github.ref, 'refs/tags/v')
run: dotnet nuget push ./nuget-package/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/${{ github.repository_owner }}" --skip-duplicate
env:
# GITHUB_TOKEN is automatically available to the workflow
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

smoke_test:
name: NuGet Smoke Test (${{ matrix.os }})
needs: pack_nuget
strategy:
matrix:
include:
- os: ubuntu-latest
- os: windows-latest
- os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
sparse-checkout: Tests/NuGetSmokeTest

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Download NuGet package
uses: actions/download-artifact@v4
with:
name: nuget-package
path: local-feed

- name: Display package contents
shell: bash
run: |
echo "--- Packages in local feed ---"
ls -la local-feed/
echo "--- Package contents ---"
unzip -l local-feed/*.nupkg || true

- name: Add local NuGet source and install package
run: |
dotnet nuget add source ${{ github.workspace }}/local-feed --name local-feed
dotnet add Tests/NuGetSmokeTest/NuGetSmokeTest.csproj package ChromaDB.NET --source local-feed

- name: Run smoke test
run: dotnet run --project Tests/NuGetSmokeTest/NuGetSmokeTest.csproj
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ runtimes/
*.tmp
*.log

Cargo.lock

# Rust exclusions
target/
Examples/BasicExample/BasicExample.csproj
Loading
Loading