Skip to content

Use recommended NATS.Net client for Nats package #1080

Use recommended NATS.Net client for Nats package

Use recommended NATS.Net client for Nats package #1080

name: HealthChecks UI CI
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- src/HealthChecks.UI/**
- src/HealthChecks.UI.*/**
- test/HealthChecks.UI.*/**
- test/_SHARED/**
- samples/HealthChecks.UI*/**
- .github/workflows/healthchecks_ui_ci.yml
- Directory.Build.props
- Directory.Build.targets
- Directory.Packages.props
- build/docker-images/HealthChecks.UI.Image/**
tags-ignore:
- release-*
- preview-*
pull_request:
branches: [ master ]
paths:
- src/HealthChecks.UI/**
- src/HealthChecks.UI.*/**
- test/HealthChecks.UI.*/**
- test/_SHARED/**
- samples/HealthChecks.UI*/**
- .github/workflows/healthchecks_ui_ci.yml
- Directory.Build.props
- Directory.Build.targets
- Directory.Packages.props
- build/docker-images/HealthChecks.UI.Image/**
jobs:
build:
runs-on: ubuntu-latest
services:
sqlserver:
image: mcr.microsoft.com/mssql/server
ports:
- 5433:1433
env:
ACCEPT_EULA: Y
SA_PASSWORD: Password12!
npgsql:
image: postgres
ports:
- 8010:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: Password12!
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: Password12!
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- name: Restore
run: |
dotnet restore ./src/HealthChecks.UI/HealthChecks.UI.csproj &&
dotnet restore ./test/HealthChecks.UI.Tests/HealthChecks.UI.Tests.csproj &&
dotnet restore ./src/HealthChecks.UI.Client/HealthChecks.UI.Client.csproj &&
dotnet restore ./test/HealthChecks.UI.Client.Tests/HealthChecks.UI.Client.Tests.csproj &&
dotnet restore ./src/HealthChecks.UI.Core/HealthChecks.UI.Core.csproj &&
dotnet restore ./test/HealthChecks.UI.Core.Tests/HealthChecks.UI.Core.Tests.csproj &&
dotnet restore ./src/HealthChecks.UI.Data/HealthChecks.UI.Data.csproj &&
dotnet restore ./test/HealthChecks.UI.Data.Tests/HealthChecks.UI.Data.Tests.csproj &&
dotnet restore ./src/HealthChecks.UI.InMemory.Storage/HealthChecks.UI.InMemory.Storage.csproj &&
dotnet restore ./src/HealthChecks.UI.MySql.Storage/HealthChecks.UI.MySql.Storage.csproj &&
dotnet restore ./src/HealthChecks.UI.PostgreSQL.Storage/HealthChecks.UI.PostgreSQL.Storage.csproj &&
dotnet restore ./src/HealthChecks.UI.SQLite.Storage/HealthChecks.UI.SQLite.Storage.csproj &&
dotnet restore ./src/HealthChecks.UI.SqlServer.Storage/HealthChecks.UI.SqlServer.Storage.csproj &&
dotnet restore ./src/HealthChecks.UI.K8s.Operator/HealthChecks.UI.K8s.Operator.csproj
- name: Check formatting
run: |
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI/HealthChecks.UI.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.UI.Tests/HealthChecks.UI.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.Client/HealthChecks.UI.Client.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.UI.Client.Tests/HealthChecks.UI.Client.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.Core/HealthChecks.UI.Core.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.UI.Core.Tests/HealthChecks.UI.Core.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.Data/HealthChecks.UI.Data.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.UI.Data.Tests/HealthChecks.UI.Data.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.InMemory.Storage/HealthChecks.UI.InMemory.Storage.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.MySql.Storage/HealthChecks.UI.MySql.Storage.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.PostgreSQL.Storage/HealthChecks.UI.PostgreSQL.Storage.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.SQLite.Storage/HealthChecks.UI.SQLite.Storage.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.SqlServer.Storage/HealthChecks.UI.SqlServer.Storage.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.UI.K8s.Operator/HealthChecks.UI.K8s.Operator.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1)
- name: Build
run: |
dotnet build --no-restore ./src/HealthChecks.UI/HealthChecks.UI.csproj &&
dotnet build --no-restore ./test/HealthChecks.UI.Tests/HealthChecks.UI.Tests.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.Client/HealthChecks.UI.Client.csproj &&
dotnet build --no-restore ./test/HealthChecks.UI.Client.Tests/HealthChecks.UI.Client.Tests.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.Core/HealthChecks.UI.Core.csproj &&
dotnet build --no-restore ./test/HealthChecks.UI.Core.Tests/HealthChecks.UI.Core.Tests.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.Data/HealthChecks.UI.Data.csproj &&
dotnet build --no-restore ./test/HealthChecks.UI.Data.Tests/HealthChecks.UI.Data.Tests.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.InMemory.Storage/HealthChecks.UI.InMemory.Storage.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.MySql.Storage/HealthChecks.UI.MySql.Storage.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.PostgreSQL.Storage/HealthChecks.UI.PostgreSQL.Storage.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.SQLite.Storage/HealthChecks.UI.SQLite.Storage.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.SqlServer.Storage/HealthChecks.UI.SqlServer.Storage.csproj &&
dotnet build --no-restore ./src/HealthChecks.UI.K8s.Operator/HealthChecks.UI.K8s.Operator.csproj
- name: Test
run: >
dotnet test
./test/HealthChecks.UI.Tests/HealthChecks.UI.Tests.csproj
--no-restore
--no-build
--collect "XPlat Code Coverage"
--results-directory .coverage
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover &&
dotnet test
./test/HealthChecks.UI.Client.Tests/HealthChecks.UI.Client.Tests.csproj
--no-restore
--no-build
--collect "XPlat Code Coverage"
--results-directory .coverage
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover &&
dotnet test
./test/HealthChecks.UI.Core.Tests/HealthChecks.UI.Core.Tests.csproj
--no-restore
--no-build
--collect "XPlat Code Coverage"
--results-directory .coverage
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
dotnet test
./test/HealthChecks.UI.Data.Tests/HealthChecks.UI.Data.Tests.csproj
--no-restore
--no-build
--collect "XPlat Code Coverage"
--results-directory .coverage
--
DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: Upload Coverage
uses: codecov/codecov-action@v5
with:
flags: UI
directory: .coverage