Skip to content

Use recommended NATS.Net client for Nats package #27

Use recommended NATS.Net client for Nats package

Use recommended NATS.Net client for Nats package #27

name: HealthChecks SurrealDB CI
on:
workflow_dispatch:
push:
branches: [master]
paths:
- src/HealthChecks.SurrealDb/**
- test/HealthChecks.SurrealDb.Tests/**
- test/_SHARED/**
- .github/workflows/healthchecks_surrealdb_ci.yml
- Directory.Build.props
- Directory.Build.targets
- Directory.Packages.props
tags-ignore:
- release-*
- preview-*
pull_request:
branches: [master]
paths:
- src/HealthChecks.SurrealDb/**
- test/HealthChecks.SurrealDb.Tests/**
- test/_SHARED/**
- .github/workflows/healthchecks_surrealdb_ci.yml
- Directory.Build.props
- Directory.Build.targets
- Directory.Packages.props
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Start SurrealDB
uses: surrealdb/setup-surreal@v2
with:
surrealdb_version: latest
surrealdb_port: 8000
surrealdb_username: root
surrealdb_password: root
surrealdb_auth: true
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
8.0.x
9.0.x
- name: Restore
run: |
dotnet restore ./src/HealthChecks.SurrealDb/HealthChecks.SurrealDb.csproj &&
dotnet restore ./test/HealthChecks.SurrealDb.Tests/HealthChecks.SurrealDb.Tests.csproj
- name: Check formatting
run: |
dotnet format --no-restore --verify-no-changes --severity warn ./src/HealthChecks.SurrealDb/HealthChecks.SurrealDb.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1) &&
dotnet format --no-restore --verify-no-changes --severity warn ./test/HealthChecks.SurrealDb.Tests/HealthChecks.SurrealDb.Tests.csproj || (echo "Run 'dotnet format' to fix issues" && exit 1)
- name: Build
run: |
dotnet build --no-restore ./src/HealthChecks.SurrealDb/HealthChecks.SurrealDb.csproj &&
dotnet build --no-restore ./test/HealthChecks.SurrealDb.Tests/HealthChecks.SurrealDb.Tests.csproj
- name: Test
run: >
dotnet test
./test/HealthChecks.SurrealDb.Tests/HealthChecks.SurrealDb.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: SurrealDb
directory: .coverage