Skip to content

split Directory.Build file into two dedicated files, one for src (packages) and one for test projects #278

split Directory.Build file into two dedicated files, one for src (packages) and one for test projects

split Directory.Build file into two dedicated files, one for src (packages) and one for test projects #278

name: HealthChecks EventStore CI
on:
push:
branches: [ master ]
paths:
- src/HealthChecks.EventStore/**
- test/HealthChecks.EventStore.Tests/**
- test/_SHARED/**
- .github/workflows/healthchecks_eventstore_ci.yml
- Directory.Build.props
- Directory.Build.targets
tags-ignore:
- release-*
- preview-*
pull_request:
branches: [ master ]
paths:
- src/HealthChecks.EventStore/**
- test/HealthChecks.EventStore.Tests/**
- test/_SHARED/**
- .github/workflows/healthchecks_eventstore_ci.yml
- Directory.Build.props
- Directory.Build.targets
jobs:
build:
runs-on: ubuntu-latest
services:
eventstore:
image: eventstore/eventstore:lts
ports:
- "2113:2113"
- "1113:1113"
env:
EVENTSTORE_INSECURE: true
EVENTSTORE_ENABLE_ATOM_PUB_OVER_HTTP: true
EVENTSTORE_ENABLE_EXTERNAL_TCP: true
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.EventStore/HealthChecks.EventStore.csproj &&
dotnet restore ./test/HealthChecks.EventStore.Tests/HealthChecks.EventStore.Tests.csproj
- name: Check formatting
run: |
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.EventStore/HealthChecks.EventStore.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.EventStore.Tests/HealthChecks.EventStore.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1)
- name: Build
run: |
dotnet build --no-restore ./src/HealthChecks.EventStore/HealthChecks.EventStore.csproj &&
dotnet build --no-restore ./test/HealthChecks.EventStore.Tests/HealthChecks.EventStore.Tests.csproj
- name: Test
run: >
dotnet test
./test/HealthChecks.EventStore.Tests/HealthChecks.EventStore.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: EventStore
directory: .coverage