Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding performance tests #1145

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
c8cba65
Adding performance test project
helto4real Jul 15, 2024
f32c690
Finishing touches on performance test
helto4real Jul 16, 2024
23fd0f1
More checks for the connection state
helto4real Jul 16, 2024
0edcb36
fix round problem
helto4real Jul 20, 2024
7d3a229
Fixed class typo to MqttEntitySubscriptionApp (#1148)
PockyBum522 Aug 15, 2024
8de7923
Improved types for generated service arguments (#1149)
FrankBakkerNl Aug 18, 2024
0df526e
Bump YamlDotNet from 15.3.0 to 16.0.0 (#1144)
dependabot[bot] Aug 18, 2024
1742f76
Upgrade Nuget packages (#1155)
helto4real Aug 21, 2024
aad4f8d
Bump System.Configuration.ConfigurationManager from 4.4.0 to 8.0.0 (#…
dependabot[bot] Aug 21, 2024
5c76c0f
make sure _jsonElement is filled with a default value so that Old and…
Barsonax Aug 24, 2024
e312b54
Fix: Registry update fails when Device Model property is an array (#1…
FrankBakkerNl Aug 24, 2024
5637b0e
Increase queue size of QueuedObservable (#1161)
helto4real Aug 25, 2024
0af3258
Make multiple text selector generate IEnumerable<string> (#1162)
FrankBakkerNl Aug 26, 2024
6c0de46
Handle decimals in JSON response (#1164)
seancallinan Sep 1, 2024
c3a7263
Properly deserialize context when deserializing state in the entity s…
nuttytree Sep 1, 2024
904ee66
Bump YamlDotNet from 16.0.0 to 16.1.0 (#1165)
dependabot[bot] Sep 3, 2024
20bf503
Upgrade Nuget packages (#1174)
helto4real Sep 11, 2024
b3d6bfa
Expose Entity Registration Conversation Options (#1167)
spelech Sep 11, 2024
370d819
Remove constructors that take client types from public HassModel API …
FrankBakkerNl Sep 15, 2024
5819667
Bump YamlDotNet from 16.1.0 to 16.1.2 (#1176)
dependabot[bot] Sep 15, 2024
b60b473
Bump Roslynator.Analyzers from 4.12.4 to 4.12.5 (#1175)
dependabot[bot] Sep 15, 2024
0c0133d
Bump xunit from 2.9.0 to 2.9.2 (#1181)
dependabot[bot] Sep 30, 2024
10ff8ab
Bump YamlDotNet from 16.1.2 to 16.1.3 (#1180)
dependabot[bot] Sep 30, 2024
c19eefe
Bump Roslynator.Analyzers from 4.12.5 to 4.12.6 (#1178)
dependabot[bot] Sep 30, 2024
fd0147e
Hassmodel APIs creates entities of types created by nd-codegen (#1188)
FrankBakkerNl Oct 17, 2024
f7dbd89
Updating nuget packages (#1189)
helto4real Oct 17, 2024
5bfde66
Fix #1166 Exception with Code generator when an attribute name has no…
FrankBakkerNl Oct 24, 2024
5add62b
Have nd-codegen check for available updates (#1191)
FrankBakkerNl Oct 26, 2024
e9a0aa2
Newest Nuget packages (#1193)
helto4real Oct 26, 2024
8a7d233
Bump Testcontainers from 3.10.0 to 4.0.0 (#1194)
dependabot[bot] Nov 7, 2024
7d1b095
Bump FluentAssertions and System.Configuration.ConfigurationManager (…
dependabot[bot] Nov 10, 2024
8dcf58b
NetDaemon 5, .NET 9 release (#1206)
helto4real Nov 24, 2024
5c12687
Bump NuGet.Protocol from 6.11.1 to 6.12.1 (#1199)
dependabot[bot] Nov 24, 2024
a98e699
Fix the startup script in docker containers for version 5 (#1208)
helto4real Nov 24, 2024
c5dc93f
Upgrade Nugets (#1213)
helto4real Dec 9, 2024
cfb9bed
Bump Testcontainers from 4.0.0 to 4.1.0 (#1214)
dependabot[bot] Dec 12, 2024
6650fed
Bump Microsoft.CodeAnalysis.CSharp from 4.11.0 to 4.12.0 (#1212)
dependabot[bot] Dec 12, 2024
532d958
Bump xunit.runner.visualstudio from 2.8.2 to 3.0.0 (#1215)
dependabot[bot] Dec 17, 2024
7d45c0a
Remove AppStateManger cache (#1217)
FrankBakkerNl Dec 21, 2024
b324819
Bump Roslynator.Analyzers from 4.12.9 to 4.12.10 (#1216)
dependabot[bot] Dec 22, 2024
5939d2c
Avoid Exceptions when AppConfigPath does not exist (#1218)
FrankBakkerNl Dec 23, 2024
c045621
Bump YamlDotNet from 16.2.1 to 16.3.0 (#1219)
dependabot[bot] Dec 26, 2024
054f3f9
Fix README (#1220)
helto4real Dec 26, 2024
d2a0892
Update the contribution page
helto4real Dec 26, 2024
48cae97
Update GitHub workflow files (#1224)
bakgaard Dec 30, 2024
77950b1
Bump coverlet.msbuild from 6.0.2 to 6.0.3 (#1225)
dependabot[bot] Dec 31, 2024
af59e74
Bump coverlet.collector from 6.0.2 to 6.0.3 (#1226)
dependabot[bot] Dec 31, 2024
155b7e4
Fix the time zone error for building on Ubuntu 24.04 machine. (#1232)
helto4real Jan 12, 2025
3272cb4
Bump xunit.runner.visualstudio from 3.0.0 to 3.0.1 (#1231)
dependabot[bot] Jan 12, 2025
56cf6cf
Bump xunit from 2.9.2 to 2.9.3 (#1230)
dependabot[bot] Jan 12, 2025
153c6ee
Upgrade latest nuget packages (#1241)
helto4real Jan 18, 2025
573f77a
Updates (#1246)
helto4real Jan 29, 2025
289287b
upgrade to .net 9
helto4real Feb 4, 2025
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
25 changes: 25 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,28 @@ dotnet_diagnostic.CA1069.severity = none
dotnet_diagnostic.CA2008.severity = none
#Use concrete types
dotnet_diagnostic.CA1859.severity = none

# After this line there are suppressions from .NET 9 upgraqdes, check these later

#Use var keyword
dotnet_diagnostic.IDE0008.severity = none
#Use namespace declaration
dotnet_diagnostic.IDE0160.severity = none
#Discard Expression value never used
dotnet_diagnostic.IDE0058.severity = none
#A type inside an executable assembly is declared as public.
dotnet_diagnostic.CA1015.severity = none
dotnet_diagnostic.CA1515.severity = none
dotnet_diagnostic.CS0618.severity = none
dotnet_diagnostic.IDE0011.severity = none
dotnet_diagnostic.IDE1006.severity = none
dotnet_diagnostic.IDE0040.severity = none
dotnet_diagnostic.IDE0079.severity = none
dotnet_diagnostic.IDE0022.severity = none
dotnet_diagnostic.IDE0300.severity = none
dotnet_diagnostic.IDE0055.severity = none
dotnet_diagnostic.IDE0130.severity = none
dotnet_diagnostic.IDE0046.severity = none
dotnet_diagnostic.IDE0072.severity = none
dotnet_diagnostic.IDE0005.severity = none

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@

If user exposed functionality or configuration are added/changed:

- [ ] Documentation added/updated for http://netdaemon.xtz
- [ ] Documentation added/updated for https://netdaemon.xyz


<!--
Expand Down
32 changes: 20 additions & 12 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
version: 2
updates:
- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- dependencies
- "pr: dependency-update"
ignore:
- dependency-name: YamlDotNet
versions:
- 11.1.0
- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- dependencies
- "pr: dependency-update"
ignore:
- dependency-name: YamlDotNet
versions:
- 11.1.0

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
labels:
- dependencies
- "pr: dependency-update"
67 changes: 33 additions & 34 deletions .github/workflows/ci_analyze.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
# Reenable when it supports .net 8
### Build and tests all pushes, also code coverage
name: 🔍 CI Analyze sources
on:
push:
branches:
- main

jobs:
sonarscanner:
name: 🔍 SonarScanner
environment: CI - analyze environment
runs-on: ubuntu-latest
steps:
- name: 📤 Checkout the repository
uses: actions/checkout@main
with:
# Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0

#### Build and tests all pushes, also code coverage
# name: 🔍 CI Analyze sources
# on:
# push:
# branches:
# - main
# jobs:
# sonarscanner:
# name: 🔍 SonarScanner
# environment: CI - analyze environment
# runs-on: ubuntu-latest
# steps:
# - name: 📤 Checkout the repository
# uses: actions/checkout@main
# with:
# # Shallow clones should be disabled for a better relevancy of analysis
# fetch-depth: 0
#
# - name: 🔍 Analyze code
# uses: highbyte/sonarscan-dotnet@v2.1.2
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# sonarOrganization: net-daemon
# sonarProjectKey: net-daemon_netdaemon
# sonarProjectName: netdaemon
# dotnetTestArguments: --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
# sonarBeginArguments: >-
# /d:sonar.inclusions="**/src/**"
# /d:sonar.test.inclusions="**/tests/**"
# /d:sonar.cs.xunit.reportsPaths="**/tests/**/TestResults/*.trx"
# /d:sonar.cs.opencover.reportsPaths="**/tests/**/coverage.opencover.xml"
- name: 🔍 Analyze code
uses: highbyte/sonarscan-dotnet@v2.4.1
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
sonarOrganization: net-daemon
sonarProjectKey: net-daemon_netdaemon
sonarProjectName: netdaemon
dotnetTestArguments: --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
sonarBeginArguments: >-
/d:sonar.inclusions="**/src/**"
/d:sonar.test.inclusions="**/tests/**"
/d:sonar.cs.xunit.reportsPaths="**/tests/**/TestResults/*.trx"
/d:sonar.cs.opencover.reportsPaths="**/tests/**/coverage.opencover.xml"
13 changes: 7 additions & 6 deletions .github/workflows/ci_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@ jobs:
- name: 📤 Checkout the repository
uses: actions/checkout@main

- name: 🥅 Install .Net 8
uses: actions/setup-dotnet@v3
- name: 🥅 Install .Net 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-quality: 'preview'
dotnet-version: '9.0.x'

- name: 🔍 Enable problem matchers
run: echo "::add-matcher::.github/matchers/dotnet.json"

- name: 🛠️ Build code
run: dotnet build --configuration Release -p:TreatWarningsAsErrors=true
run: dotnet build --configuration Release
# run: dotnet build --configuration Release -p:TreatWarningsAsErrors=true temprarily disabled due to Nuget bug

- name: 👀 Unit Test
run: |
Expand Down Expand Up @@ -59,7 +60,7 @@ jobs:
path-to-lcov: ${{github.workspace}}/codecover.info

- name: 📨 Publish coverage to codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
flags: unittests # optional
name: codecov-umbrella # optional
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/push_docker_addon_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,35 @@ jobs:
steps:
- name: 📤 Checkout the repository
uses: actions/checkout@main

- name: 📆 Set version number
run: |
sed -i '/ private const string Version = /c\ private const string Version = "feature build";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="feature" \\' ${{github.workspace}}/Dockerfile.AddOn

- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v3

- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: 🔓 Login to Docker hub
uses: docker/login-action@v1.10.0
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: 🔓 Login to GitHub Container Registry
uses: docker/login-action@v1.10.0
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: 🛠️ Run Buildx
run: |
docker buildx build \
Expand All @@ -47,5 +53,5 @@ jobs:
--no-cache \
--file ./Dockerfile.AddOn . \
--compress \
--tag "netdaemon/netdaemon_addon4:feature-${{ github.event.inputs.tag }}" \
--tag "ghcr.io/netdaemon_addon4:feature-${{ github.event.inputs.tag }}"
--tag "netdaemon/netdaemon_addon5:feature-${{ github.event.inputs.tag }}" \
--tag "ghcr.io/netdaemon_addon5:feature-${{ github.event.inputs.tag }}"
25 changes: 19 additions & 6 deletions .github/workflows/push_docker_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,36 @@ jobs:
steps:
- name: 📤 Checkout the repository
uses: actions/checkout@main

- name: 📆 Set version number
run: |
echo setting source version: feature-${{ github.event.inputs.tag }}
sed -i '/ private const string Version = /c\ private const string Version = "feature-${{ github.event.inputs.tag }}";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="feature-${{ github.event.inputs.tag }}"' ${{github.workspace}}/Dockerfile.AddOn

- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v3

- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: 🔓 Login to Docker hub
uses: docker/login-action@v1.10.0
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: 🔓 Login to GitHub Container Registry
uses: docker/login-action@v1.10.0
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: 🛠️ Run Buildx
run: |
docker buildx build \
Expand All @@ -50,37 +56,44 @@ jobs:
--compress \
--tag "netdaemon/netdaemon4:feature-${{ github.event.inputs.tag }}" \
--tag "ghcr.io/net-daemon/netdaemon4:feature-${{ github.event.inputs.tag }}"

deploy_docker_addon:
name: 📦 Deploy to Docker add-on with tag
runs-on: ubuntu-latest
environment: CI - release environment
steps:
- name: 📤 Checkout the repository
uses: actions/checkout@main

- name: 📆 Set version number
run: |
echo setting source version: feature-${{ github.event.inputs.tag }}
sed -i '/ private const string Version = /c\ private const string Version = "feature-${{ github.event.inputs.tag }}";' ${{github.workspace}}/src/Runtime/NetDaemon.Runtime/Internal/NetDaemonRuntime.cs
sed -i '/ io.hass.version=/c\ io.hass.version="feature-${{ github.event.inputs.tag }}"' ${{github.workspace}}/Dockerfile.AddOn

- name: 📎 Set up QEMU
uses: docker/setup-qemu-action@v3

- name: 🔧 Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: 🧰 Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: 🔓 Login to Docker hub
uses: docker/login-action@v1.10.0
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: 🔓 Login to GitHub Container Registry
uses: docker/login-action@v1.10.0
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: 🛠️ Run Buildx
run: |
docker buildx build \
Expand All @@ -89,5 +102,5 @@ jobs:
--no-cache \
--file ./Dockerfile.AddOn . \
--compress \
--tag "netdaemon/netdaemon_addon4:feature-${{ github.event.inputs.tag }}" \
--tag "ghcr.io/net-daemon/netdaemon_addon4:feature-${{ github.event.inputs.tag }}"
--tag "netdaemon/netdaemon_addon5:feature-${{ github.event.inputs.tag }}" \
--tag "ghcr.io/net-daemon/netdaemon_addon5:feature-${{ github.event.inputs.tag }}"
Loading