Skip to content

prepare v1.3.9

prepare v1.3.9 #286

name: Build_With_Stable_2x
on:
push:
branches: [ dev, master ]
pull_request:
branches: [ dev, master ]
jobs:
windows:
name: build on windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
- name: Build with dotnet
run: |
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src\Nacos\Nacos.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src\Nacos.AspNetCore\Nacos.AspNetCore.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src\Nacos.Microsoft.Extensions.Configuration\Nacos.Microsoft.Extensions.Configuration.csproj
dotnet msbuild -p:Configuration=Release -p:RestoreSources=https://api.nuget.org/v3/index.json -r -t:Build src\Nacos.System.Configuration\Nacos.System.Configuration.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json tests\Nacos.AspNetCore.Tests\Nacos.AspNetCore.Tests.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json tests\Nacos.Microsoft.Extensions.Configuration.Tests\Nacos.Microsoft.Extensions.Configuration.Tests.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json tests\Nacos.Tests\Nacos.Tests.csproj
linux:
name: build on linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
- name: Setup up JDK 1.8
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 8
- name: Show dotnet Version
run: dotnet --version
- name: Show java Version
run: java -version
- name: Setup Stable 2.x Nacos Server
run: |
wget https://github.com/alibaba/nacos/releases/download/2.1.0/nacos-server-2.1.0.tar.gz
tar -xvf nacos-server-2.1.0.tar.gz
cd nacos/bin
# sed -i 's/nacos.core.auth.enabled=false/nacos.core.auth.enabled=true/g' ../conf/application.properties
chmod 755 startup.sh
nohup ./startup.sh -m standalone 2>&1 &
sleep 30
curl "127.0.0.1:8848/nacos/v1/ns/operator/metrics"
- name: Build with dotnet
run: |
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/Nacos/Nacos.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/Nacos.AspNetCore/Nacos.AspNetCore.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json src/Nacos.Microsoft.Extensions.Configuration/Nacos.Microsoft.Extensions.Configuration.csproj
dotnet msbuild -p:Configuration=Release -p:RestoreSources=https://api.nuget.org/v3/index.json -r -t:Build src/Nacos.System.Configuration/Nacos.System.Configuration.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json tests/Nacos.AspNetCore.Tests/Nacos.AspNetCore.Tests.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json tests/Nacos.Microsoft.Extensions.Configuration.Tests/Nacos.Microsoft.Extensions.Configuration.Tests.csproj
dotnet build --configuration Release --source https://api.nuget.org/v3/index.json tests/Nacos.Tests/Nacos.Tests.csproj
- name: Test with dotnet
run: |
dotnet test tests/Nacos.AspNetCore.Tests/Nacos.AspNetCore.Tests.csproj --filter "Category=all|Category=1x|Category=2x" --no-restore
dotnet test tests/Nacos.Microsoft.Extensions.Configuration.Tests/Nacos.Microsoft.Extensions.Configuration.Tests.csproj --filter "Category=all|Category=1x|Category=2x" --no-restore
dotnet test tests/Nacos.Tests/Nacos.Tests.csproj --filter "Category=all|Category=1x|Category=2x" --no-restore
- name: Upload Nacos logs
if: always()
uses: actions/upload-artifact@v3
with:
name: nacos-logs
path: /home/runner/work/nacos-sdk-csharp/nacos-sdk-csharp/nacos/logs