Skip to content

Replace Nest to Elastic.Clients.Elasticsearch #537

Replace Nest to Elastic.Clients.Elasticsearch

Replace Nest to Elastic.Clients.Elasticsearch #537

name: HealthChecks Elastic Search CI
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- src/HealthChecks.Elasticsearch/**
- test/HealthChecks.Elasticsearch.Tests/**
- test/_SHARED/**
- .github/workflows/healthchecks_elasticsearch_ci.yml
- Directory.Build.props
- Directory.Build.targets
tags-ignore:
- release-*
- preview-*
pull_request:
branches: [ master ]
paths:
- src/HealthChecks.Elasticsearch/**
- test/HealthChecks.Elasticsearch.Tests/**
- test/_SHARED/**
- .github/workflows/healthchecks_elasticsearch_ci.yml
- Directory.Build.props
- Directory.Build.targets
jobs:
build:
runs-on: ubuntu-latest
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2
ports:
- 9300:9300
- 9201:9200
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Restore
run: |
dotnet restore ./src/HealthChecks.Elasticsearch/HealthChecks.Elasticsearch.csproj &&
dotnet restore ./test/HealthChecks.Elasticsearch.Tests/HealthChecks.Elasticsearch.Tests.csproj
- name: Check formatting
run: |
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.Elasticsearch/HealthChecks.Elasticsearch.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.Elasticsearch.Tests/HealthChecks.Elasticsearch.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1)
- name: Build
run: |
dotnet build --no-restore ./src/HealthChecks.Elasticsearch/HealthChecks.Elasticsearch.csproj &&
dotnet build --no-restore ./test/HealthChecks.Elasticsearch.Tests/HealthChecks.Elasticsearch.Tests.csproj
- name: Test
run: >
dotnet test
./test/HealthChecks.Elasticsearch.Tests/HealthChecks.Elasticsearch.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: Elasticsearch
directory: .coverage