diff --git a/.circleci/config.yml b/.circleci/config.yml index 11973a61a..416980e73 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -131,34 +131,22 @@ jobs: name: "Start InfluxDB" command: /c/influxdata/influxdb-1.8.0-1/influxd.exe -config "Scripts/influxdb.conf" background: true - - run: | - sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'net5.0'<\/TargetFramework>' Client.Core.Test/Client.Core.Test.csproj - sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'net5.0'<\/TargetFramework>' Client.Test/Client.Test.csproj - sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'net5.0'<\/TargetFramework>' Client.Legacy.Test/Client.Legacy.Test.csproj - sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'net5.0'<\/TargetFramework>' Client.Linq.Test/Client.Linq.Test.csproj - sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'net5.0'<\/TargetFramework>' Examples/Examples.csproj - run: dotnet sln remove Examples/ExampleBlazor/ExampleBlazor.csproj - run: dotnet nuget locals --clear all - - run: dotnet restore --no-cache --force -s https://api.nuget.org/v3/index.json - - run: dotnet build - - run: dotnet test Client.Legacy.Test/Client.Legacy.Test.csproj --no-build + - run: dotnet restore --no-cache --framework="net5.0" --force -s https://api.nuget.org/v3/index.json + - run: dotnet build Client.Legacy.Test/Client.Legacy.Test.csproj --no-restore --framework="net5.0" + - run: dotnet test Client.Legacy.Test/Client.Legacy.Test.csproj --no-build --framework="net5.0" check-compilation-warnings: docker: - image: *default-dotnet-image steps: - checkout - - run: | - sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'net8.0'<\/TargetFramework>' Client.Core.Test/Client.Core.Test.csproj - sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'net8.0'<\/TargetFramework>' Client.Test/Client.Test.csproj - sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'net8.0'<\/TargetFramework>' Client.Legacy.Test/Client.Legacy.Test.csproj - sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'net8.0'<\/TargetFramework>' Client.Linq.Test/Client.Linq.Test.csproj - sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'net8.0'<\/TargetFramework>' Examples/Examples.csproj - run: name: Check compilation warnings command: | dotnet clean --configuration Release - dotnet build --configuration Release -warnAsError -warnAsMessage:CS0419,CS0618,CS1591,CS1573,CS1574,NETSDK1138 + dotnet build --framework="net8.0" --configuration Release -warnAsError -warnAsMessage:CS0419,CS0618,CS1591,CS1573,CS1574,NETSDK1138 check-code-formatting: docker: @@ -213,21 +201,28 @@ workflows: name: dotnet-3.1-nightly influxdb-image: "quay.io/influxdb/influxdb:nightly" dotnet-image: "mcr.microsoft.com/dotnet/core/sdk:3.1" + dotnet-target-version: netcoreapp3.1 - tests-dotnet: name: dotnet-3.1 dotnet-image: "mcr.microsoft.com/dotnet/core/sdk:3.1" + dotnet-target-version: netcoreapp3.1 - tests-dotnet: name: dotnet-5.0 code-coverage-report: true - dotnet-image: "mcr.microsoft.com/dotnet/sdk:5.0-bullseye-slim" + dotnet-image: "mcr.microsoft.com/dotnet/sdk:5.0" + dotnet-target-version: net5.0 - tests-dotnet: name: dotnet-6.0 dotnet-image: "mcr.microsoft.com/dotnet/sdk:6.0" + dotnet-target-version: net6.0 - tests-dotnet: name: dotnet-7.0 dotnet-image: "mcr.microsoft.com/dotnet/sdk:7.0" + dotnet-target-version: net7.0 - tests-dotnet: name: dotnet-8.0 + dotnet-image: "mcr.microsoft.com/dotnet/sdk:8.0" + dotnet-target-version: net8.0 - tests-windows: name: dotnet-windows - deploy-preview: diff --git a/Client.Core/Client.Core.csproj b/Client.Core/Client.Core.csproj index 40524e1a7..9b7fb85e8 100644 --- a/Client.Core/Client.Core.csproj +++ b/Client.Core/Client.Core.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1 + netstandard2.0;netstandard2.1;net6.0 8 InfluxDB Client Core - exceptions, validations, REST client. diff --git a/Client/Client.csproj b/Client/Client.csproj index ede528d08..d0d7fc992 100644 --- a/Client/Client.csproj +++ b/Client/Client.csproj @@ -1,7 +1,7 @@ - netstandard2.0;netstandard2.1 + netstandard2.0;netstandard2.1;net6.0 8 The reference client that allows query, write and management (bucket, organization, users) for the InfluxDB 2.x. @@ -42,9 +42,11 @@ - + + + diff --git a/Client/Writes/PointData.Builder.cs b/Client/Writes/PointData.Builder.cs index 4815c8e04..cf22b276e 100644 --- a/Client/Writes/PointData.Builder.cs +++ b/Client/Writes/PointData.Builder.cs @@ -275,4 +275,4 @@ private Builder PutField(string name, object value) } } } -} \ No newline at end of file +} diff --git a/Scripts/ci-test.sh b/Scripts/ci-test.sh index b6d258413..17cdfd8ad 100755 --- a/Scripts/ci-test.sh +++ b/Scripts/ci-test.sh @@ -19,25 +19,13 @@ echo "$NET_TEST_VERSION" DEFAULT_NET_TARGET_VERSION="netstandard2.1" NET_TARGET_VERSION="${NET_TARGET_VERSION:-$DEFAULT_NET_TARGET_VERSION}" - -sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'"${NET_TEST_VERSION}"'<\/TargetFramework>' Client.Core.Test/Client.Core.Test.csproj -sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'"${NET_TEST_VERSION}"'<\/TargetFramework>' Client.Test/Client.Test.csproj -sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'"${NET_TEST_VERSION}"'<\/TargetFramework>' Client.Legacy.Test/Client.Legacy.Test.csproj -sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'"${NET_TEST_VERSION}"'<\/TargetFramework>' Client.Linq.Test/Client.Linq.Test.csproj -sed -i '/netcoreapp3.1;net5.0;net6.0;net7.0;net8.0<\/TargetFrameworks>/c\'"${NET_TEST_VERSION}"'<\/TargetFramework>' Examples/Examples.csproj - -sed -i '/netstandard2.0;netstandard2.1<\/TargetFrameworks>/c\'"${NET_TARGET_VERSION}"'<\/TargetFramework>' Client.Core/Client.Core.csproj -sed -i '/netstandard2.0;netstandard2.1<\/TargetFrameworks>/c\'"${NET_TARGET_VERSION}"'<\/TargetFramework>' Client/Client.csproj -sed -i '/netstandard2.0;netstandard2.1<\/TargetFrameworks>/c\'"${NET_TARGET_VERSION}"'<\/TargetFramework>' Client.Legacy/Client.Legacy.csproj -sed -i '/netstandard2.0;netstandard2.1<\/TargetFrameworks>/c\'"${NET_TARGET_VERSION}"'<\/TargetFramework>' Client.Linq/Client.Linq.csproj - TRX2JUNIT_VERSION="" TEST_PARAMS=() if [[ "$CODE_COVERAGE_REPORT" = true ]] then - TRX2JUNIT_VERSION="1.6.0" TEST_PARAMS=(--collect:"XPlat Code Coverage") + TRX2JUNIT_VERSION="1.6.0" else TRX2JUNIT_VERSION="1.3.2" fi @@ -65,16 +53,18 @@ dotnet tool install --tool-path="./trx2junit/" trx2junit --version ${TRX2JUNIT_V # # Build # -dotnet restore -dotnet build --no-restore +dotnet build Client.Core.Test/Client.Core.Test.csproj --framework="${NET_TARGET_VERSION}" +dotnet build Client.Test/Client.Test.csproj --framework="${NET_TARGET_VERSION}" +dotnet build Client.Legacy.Test/Client.Legacy.Test.csproj --framework="${NET_TARGET_VERSION}" +dotnet build Client.Linq.Test/Client.Linq.Test.csproj --framework="${NET_TARGET_VERSION}" # # Test # -dotnet test Client.Core.Test/Client.Core.Test.csproj --no-build --verbosity normal --logger trx "${TEST_PARAMS[@]}" -dotnet test Client.Test/Client.Test.csproj --no-build --verbosity normal --logger trx "${TEST_PARAMS[@]}" -dotnet test Client.Legacy.Test/Client.Legacy.Test.csproj --no-build --verbosity normal --logger trx "${TEST_PARAMS[@]}" -dotnet test Client.Linq.Test/Client.Linq.Test.csproj --no-build --verbosity normal --logger trx "${TEST_PARAMS[@]}" +dotnet test Client.Core.Test/Client.Core.Test.csproj --no-build --verbosity normal --framework="${NET_TARGET_VERSION}" --logger trx "${TEST_PARAMS[@]}" +dotnet test Client.Test/Client.Test.csproj --no-build --verbosity normal --framework="${NET_TARGET_VERSION}" --logger trx "${TEST_PARAMS[@]}" +dotnet test Client.Legacy.Test/Client.Legacy.Test.csproj --no-build --verbosity normal --framework="${NET_TARGET_VERSION}" --logger trx "${TEST_PARAMS[@]}" +dotnet test Client.Linq.Test/Client.Linq.Test.csproj --no-build --verbosity normal --framework="${NET_TARGET_VERSION}" --logger trx "${TEST_PARAMS[@]}" # # Convert test results to Junit format