Skip to content
Merged
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
11 changes: 9 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,17 @@ jobs:
working-directory: ./tests

- name: Run tests
run: dotnet test --configuration Release --no-build --verbosity normal --blame-hang-timeout 150s -d run.log --logger "trx;LogFileName=test-results.trx"
run: dotnet test --configuration Release --no-build --verbosity normal --blame-hang-timeout 150s -d run.log --logger "trx;LogFileName=test-results.trx" --collect:"XPlat Code Coverage"
timeout-minutes: 10

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: always()
with:
Comment thread
steingran marked this conversation as resolved.
files: '**/TestResults/**/coverage.cobertura.xml'
fail_ci_if_error: false
verbose: true

- name: Test Report
uses: dorny/test-reporter@v1
if: always()
Expand All @@ -62,4 +70,3 @@ jobs:
if: always()
run: docker compose down
working-directory: ./tests

18 changes: 13 additions & 5 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
contents: write
packages: write
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -53,9 +53,17 @@ jobs:
working-directory: ./tests

- name: Run all tests
run: dotnet test --configuration Release --no-build --verbosity normal --blame-hang-timeout 150s --logger "trx;LogFileName=test-results.trx"
run: dotnet test --configuration Release --no-build --verbosity normal --blame-hang-timeout 150s --logger "trx;LogFileName=test-results.trx" --collect:"XPlat Code Coverage"
timeout-minutes: 10

- name: Upload coverage to CodeCov
Comment thread
steingran marked this conversation as resolved.
uses: codecov/codecov-action@v4
if: always()
with:
Comment thread
steingran marked this conversation as resolved.
files: '**/TestResults/**/coverage.cobertura.xml'
fail_ci_if_error: false
verbose: true

- name: Stop Docker Compose services
if: always()
run: docker compose down
Expand Down Expand Up @@ -118,17 +126,17 @@ jobs:
unzip -q -o "$pkg" -d temp_extract
if [ -f temp_extract/*.nuspec ]; then
nuspec_file=$(find temp_extract -name "*.nuspec" | head -n 1)

# Check for required metadata
if ! grep -q "<license" "$nuspec_file"; then
echo "❌ Missing license information in $(basename $pkg)"
exit 1
fi

if ! grep -q "<repository" "$nuspec_file"; then
echo "⚠️ Warning: Missing repository information in $(basename $pkg)"
fi

echo "βœ… Metadata check passed for $(basename $pkg)"
fi
rm -rf temp_extract
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# MultiLock

[![codecov](https://codecov.io/gh/steingran/MultiLock/branch/main/graph/badge.svg)](https://codecov.io/gh/steingran/MultiLock)

A comprehensive .NET framework for implementing the Leader Election pattern with support for multiple providers including Azure Blob Storage, SQL Server, Redis, File System, In-Memory, Consul, and ZooKeeper.

## Architecture Overview
Expand Down
41 changes: 41 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
codecov:
require_ci_to_pass: yes
notify:
wait_for_ci: yes

coverage:
precision: 2
round: down
range: "70..100"

status:
project:
default:
target: auto
threshold: 1%
base: auto
if_ci_failed: error
patch:
default:
target: auto
threshold: 1%
base: auto
if_ci_failed: error

comment:
layout: "reach,diff,flags,tree,footer"
behavior: default
require_changes: false
require_base: no
require_head: yes

ignore:
- "tests/**"
- "samples/**"
- "**/obj/**"
- "**/bin/**"
- "**/*.Tests/**"
- "**/*.IntegrationTests/**"
- "**/*.Sample/**"
- "**/*.MultiProvider/**"

Loading