Skip to content

Add .NET NuGet package for NetRemote gRPC API bindings #1

Add .NET NuGet package for NetRemote gRPC API bindings

Add .NET NuGet package for NetRemote gRPC API bindings #1

Workflow file for this run

name: '.NET Tests 🧪'
on:
workflow_dispatch:
workflow_call:
push:
branches:
- develop
- main
paths:
- 'api/dotnet/**'
- 'api/protos/**'
- 'tests/integration/dotnet/**'
- '.github/workflows/dotnet-tests.yml'
pull_request:
branches:
- develop
- main
paths:
- 'api/dotnet/**'
- 'api/protos/**'
- 'tests/integration/dotnet/**'
- '.github/workflows/dotnet-tests.yml'
jobs:
dotnet-build:
name: Build .NET API Bindings
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore api/dotnet/NetRemoteClient.csproj
- name: Build
run: dotnet build api/dotnet/NetRemoteClient.csproj --configuration Release --no-restore
- name: Pack NuGet package
run: dotnet pack api/dotnet/NetRemoteClient.csproj --configuration Release --no-build --output ./artifacts
- name: Upload NuGet package artifact
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: ./artifacts/*.nupkg
retention-days: 7
dotnet-integration-tests:
name: .NET Integration Tests
runs-on: ubuntu-latest
needs: dotnet-build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore dependencies
run: dotnet restore tests/integration/dotnet/NetRemoteClient.IntegrationTests.csproj
- name: Build
run: dotnet build tests/integration/dotnet/NetRemoteClient.IntegrationTests.csproj --configuration Release --no-restore
- name: Run integration tests
run: dotnet test tests/integration/dotnet/NetRemoteClient.IntegrationTests.csproj --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx"
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: dotnet-test-results
path: tests/integration/dotnet/TestResults/*.trx
retention-days: 7
dotnet-tests-windows:
name: .NET Tests (Windows)
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Build and test
run: dotnet test tests/integration/dotnet/NetRemoteClient.IntegrationTests.csproj --configuration Release --verbosity normal