Skip to content
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
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Test .NET

on:
push:
branches:
- master
paths-ignore:
- '*.md'
- 'Docs/**'
- 'Examples/**'
- '.gitignore'
pull_request:
branches:
- master

env:
DOTNET_VERSION: '8.x'
BUILD_CONFIGURATION: 'Release'

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Restore dependencies
run: dotnet restore DnsClientX.sln

- name: Build solution
run: dotnet build DnsClientX.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore

- name: Run tests
run: dotnet test DnsClientX.Tests/DnsClientX.Tests.csproj --configuration ${{ env.BUILD_CONFIGURATION }} --framework net8.0 --no-build --verbosity normal --logger trx --collect:"XPlat Code Coverage"

- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.os }}
path: '**/*.trx'

- name: Upload coverage reports
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-reports-${{ matrix.os }}
path: '**/coverage.cobertura.xml'

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: '**/coverage.cobertura.xml'

2 changes: 1 addition & 1 deletion DnsClientX.Tests/DnsClientX.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.4.0" Condition="$([MSBuild]::IsOsPlatform('OSX'))" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.14.0" Condition="$([MSBuild]::IsOsPlatform('OSX'))" />
<PackageReference Include="SemanticComparison" Version="4.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
<PackageReference Include="xunit" Version="2.9.3" />
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ This library supports multiple NET versions:
- System.Text.Json

## Build Status
[![CI](https://github.com/EvotecIT/DnsClientX/actions/workflows/ci.yml/badge.svg)](https://github.com/EvotecIT/DnsClientX/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/EvotecIT/DnsClientX/branch/master/graph/badge.svg)](https://codecov.io/gh/EvotecIT/DnsClientX)

Azure DevOps pipelines are kept for reference but remain disabled.


| Platform | Status | Test Report | Code Coverage | .NET |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| Windows | <a href="https://dev.azure.com/evotecpl/DnsClientX/_build?definitionId=30"><img src="https://img.shields.io/azure-devops/tests/evotecpl/DnsClientX/30/master?compact_message&style=flat&label=Tests%20Windows"></a> | <a href="https://dev.azure.com/evotecpl/DnsClientX/_test/analytics?definitionId=30&contextType=build"><img src="https://img.shields.io/azure-devops/tests/evotecpl/DnsClientX/30/master?compact_message&style=flat&label=Test Analytics"></a> | <a href="https://dev.azure.com/evotecpl/DnsClientX/_build?definitionId=30&view=ms.vss-pipelineanalytics-web.new-build-definition-pipeline-analytics-view-cardmetrics"><img src="https://img.shields.io/azure-devops/coverage/evotecpl/DnsClientX/30"></a> | .NET 4.7.2, NET 4.8, .NET 6.0, .NET 7.0, .NET 8.0, .NET Standard 2.0 |
| Linux | <a href="https://dev.azure.com/evotecpl/DnsClientX/_build?definitionId=31"><img src="https://img.shields.io/azure-devops/tests/evotecpl/DnsClientX/31/master?compact_message&style=flat&label=Tests%20Linux"></a> | <a href="https://dev.azure.com/evotecpl/DnsClientX/_test/analytics?definitionId=31&contextType=build"><img src="https://img.shields.io/azure-devops/tests/evotecpl/DnsClientX/31/master?compact_message&style=flat&label=Test Analytics"></a> | | .NET 6.0, .NET 7.0, .NET Standard 2.0, .NET 8.0 |
| MacOs | <a href="https://dev.azure.com/evotecpl/DnsClientX/_build?definitionId=32"><img src="https://img.shields.io/azure-devops/tests/evotecpl/DnsClientX/32/master?compact_message&style=flat&label=Tests%20MacOs"></a> | <a href="https://dev.azure.com/evotecpl/DnsClientX/_test/analytics?definitionId=32&contextType=build"><img src="https://img.shields.io/azure-devops/tests/evotecpl/DnsClientX/32/master?compact_message&style=flat&label=Test Analytics"></a> | | .NET 6.0, .NET 7.0, .NET Standard 2.0, .NET 8.0 |
## Features

- [x] Supports multiple built-in DNS Providers (System, Cloudflare, Google, Quad9, OpenDNS, etc.)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading