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

Add ClickHouse DataBase HealthCheck #1660

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ flags:
carryforward: true
AzureStorage:
carryforward: true
ClickHouse:
carryforward: true
Consul:
carryforward: true
CosmosDb:
Expand Down
3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ aws:
azure:
- src/HealthChecks.Azure*/**/*

clickhouse:
- src/HealthChecks.ClickHouse/**/*

consul:
- src/HealthChecks.Consul/**/*

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/healthchecks_clickhouse_cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: HealthChecks ClickHouse DataBase CD

on:
push:
tags:
- release-clickhouse-*
- release-all-*

jobs:
build:
env:
BUILD_CONFIG: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Restore
run: dotnet restore ./src/HealthChecks.ClickHouse/HealthChecks.ClickHouse.csproj
- name: Build
run: dotnet build --no-restore ./src/HealthChecks.ClickHouse/HealthChecks.ClickHouse.csproj -c $BUILD_CONFIG
- name: Pack
run: dotnet pack --no-build ./src/HealthChecks.ClickHouse/HealthChecks.ClickHouse.csproj -c $BUILD_CONFIG -o ./artifacts
- name: Publish
run: dotnet nuget push ./artifacts/AspNetCore.HealthChecks.ClickHouse.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
30 changes: 30 additions & 0 deletions .github/workflows/healthchecks_clickhouse_cd_preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: HealthChecks ClickHouse DataBase Preview CD

on:
push:
tags:
- preview-clickhouse-*
- preview-all-*

jobs:
build:
env:
BUILD_CONFIG: Release
VERSION_SUFFIX: rc2.${{ github.run_number }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
- name: Restore
run: dotnet restore ./src/HealthChecks.ClickHouse/HealthChecks.ClickHouse.csproj
- name: Build
run: dotnet build --no-restore ./src/HealthChecks.ClickHouse/HealthChecks.ClickHouse.csproj -c $BUILD_CONFIG
- name: Pack
run: dotnet pack --no-build ./src/HealthChecks.ClickHouse/HealthChecks.ClickHouse.csproj --version-suffix $VERSION_SUFFIX -c $BUILD_CONFIG -o ./artifacts
- name: Publish
run: dotnet nuget push ./artifacts/AspNetCore.HealthChecks.ClickHouse.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
70 changes: 70 additions & 0 deletions .github/workflows/healthchecks_clickhouse_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: HealthChecks ClickHouse DataBase CI

on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- src/HealthChecks.ClickHouse/**
- test/HealthChecks.ClickHouse.Tests/**
- test/_SHARED/**
- .github/workflows/healthchecks_clickhouse_ci.yml
- Directory.Build.props
- Directory.Build.targets
tags-ignore:
- release-*
- preview-*

pull_request:
branches: [ master ]
paths:
- src/HealthChecks.ClickHouse/**
- test/HealthChecks.ClickHouse.Tests/**
- test/_SHARED/**
- .github/workflows/healthchecks_clickhouse_ci.yml
- Directory.Build.props
- Directory.Build.targets

jobs:
build:
runs-on: ubuntu-latest
services:
ClickHouse:
image: yandex/clickhouse-server
ports:
- 8123:8123
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
6.0.x
7.0.x
- name: Restore
run: |
dotnet restore ./src/HealthChecks.ClickHouse/HealthChecks.ClickHouse.csproj &&
dotnet restore ./test/HealthChecks.ClickHouse.Tests/HealthChecks.ClickHouse.Tests.csproj
- name: Check formatting
run: |
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.ClickHouse/HealthChecks.ClickHouse.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.ClickHouse.Tests/HealthChecks.ClickHouse.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1)
- name: Build
run: |
dotnet build --no-restore ./src/HealthChecks.ClickHouse/HealthChecks.ClickHouse.csproj &&
dotnet build --no-restore ./test/HealthChecks.ClickHouse.Tests/HealthChecks.ClickHouse.Tests.csproj
- name: Test
run: >
dotnet test
./test/HealthChecks.ClickHouse.Tests/HealthChecks.ClickHouse.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@v3
with:
flags: ClickHouse
directory: .coverage
Loading