Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-redis-meter
Browse files Browse the repository at this point in the history
  • Loading branch information
Coelho04 authored Oct 23, 2024
2 parents 1916324 + c978814 commit 166c7ab
Show file tree
Hide file tree
Showing 174 changed files with 2,807 additions and 686 deletions.
91 changes: 82 additions & 9 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,48 @@ comment:

ignore:
- "**.md"
- "src/Shared" # copied from main OTel project and has code coverage there
- "test"
- "examples"
- "build"
- ".github"
- ".vscode"

flags:
unittests-Solution:
unittests-Exporter.Geneva:
carryforward: true
paths:
- src
- src/OpenTelemetry.Exporter.Geneva

unittests-Exporter.Geneva:
unittests-Exporter.InfluxDB:
carryforward: true
paths:
- src/OpenTelemetry.Exporter.Geneva
- src/OpenTelemetry.Exporter.InfluxDB

unittests-Exporter.Instana:
carryforward: true
paths:
- src/OpenTelemetry.Exporter.Instana

unittests-Exporter.OneCollector:
carryforward: true
paths:
- src/OpenTelemetry.Exporter.OneCollector

unittests-Exporter.Stackdriver:
carryforward: true
paths:
- src/OpenTelemetry.Exporter.Stackdriver

unittests-Extensions:
carryforward: true
paths:
- src/OpenTelemetry.Extensions

unittests-Extensions.Enrichment:
carryforward: true
paths:
- src/OpenTelemetry.Extensions.Enrichment

unittests-Instrumentation.AspNet:
carryforward: true
paths:
Expand All @@ -63,26 +77,59 @@ flags:
paths:
- src/OpenTelemetry.Instrumentation.AspNetCore

unittests-Instrumentation.AWS:
carryforward: true
paths:
- src/OpenTelemetry.Extensions.AWS
- src/OpenTelemetry.Instrumentation.AWS
- src/OpenTelemetry.Instrumentation.AWSLambda

# Note: No unit tests currently for Cassandra being run in CI.
#unittests-Instrumentation.Cassandra:
# carryforward: true
# paths:
# - src/OpenTelemetry.Instrumentation.Cassandra

unittests-Instrumentation.ConfluentKafka:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.ConfluentKafka

unittests-Instrumentation.ElasticsearchClient:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.ElasticsearchClient

unittests-Instrumentation.EntityFrameworkCore:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.EntityFrameworkCore

unittests-Instrumentation.EventCounters:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.EventCounters

unittests-Instrumentation.Http:
unittests-Instrumentation.GrpcCore:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.Http
- src/OpenTelemetry.Instrumentation.GrpcCore

unittests-Instrumentation.GrpcNetClient:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.GrpcNetClient

unittests-Instrumentation.Hangfire:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.Hangfire

unittests-Instrumentation.Http:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.Http

unittests-Instrumentation.Owin:
carryforward: true
paths:
Expand All @@ -93,6 +140,11 @@ flags:
paths:
- src/OpenTelemetry.Instrumentation.Process

unittests-Instrumentation.Quartz:
carryforward: true
paths:
- src/OpenTelemetry.Instrumentation.Quartz

unittests-Instrumentation.Runtime:
carryforward: true
paths:
Expand All @@ -119,11 +171,21 @@ flags:
- src/OpenTelemetry.PersistentStorage.Abstractions
- src/OpenTelemetry.PersistentStorage.FileSystem

unittests-Resources.AWS:
carryforward: true
paths:
- src/OpenTelemetry.Resources.AWS

unittests-Resources.Azure:
carryforward: true
paths:
- src/OpenTelemetry.Resources.Azure

unittests-Resources.Container:
carryforward: true
paths:
- src/OpenTelemetry.Resources.Container

unittests-Resources.Gcp:
carryforward: true
paths:
Expand All @@ -149,7 +211,18 @@ flags:
paths:
- src/OpenTelemetry.Resources.ProcessRuntime

unittests-SemanticConventions:
unittests-Sampler.AWS:
carryforward: true
paths:
- src/OpenTelemetry.Sampler.AWS

# Note: No unit tests currently for SemanticConventions being run in CI.
#unittests-SemanticConventions:
# carryforward: true
# paths:
# - src/OpenTelemetry.SemanticConventions

unittests-Contrib.Shared.Tests:
carryforward: true
paths:
- src/OpenTelemetry.SemanticConventions
- src/Shared
2 changes: 2 additions & 0 deletions .github/component_owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ components:
src/OpenTelemetry.Instrumentation.AWS/:
- srprash
- ppittle
- muhammad-othman
src/OpenTelemetry.Instrumentation.AWSLambda/:
- rypdal
- Oberon00
Expand Down Expand Up @@ -131,6 +132,7 @@ components:
test/OpenTelemetry.Instrumentation.AWS.Tests/:
- srprash
- ppittle
- muhammad-othman
test/OpenTelemetry.Instrumentation.AWSLambda.Tests/:
- rypdal
- Oberon00
Expand Down
44 changes: 35 additions & 9 deletions .github/workflows/Component.BuildTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
project-name:
required: true
type: string
run-tests:
required: false
default: true
type: boolean
code-cov-name:
required: true
type: string
Expand All @@ -21,6 +25,17 @@ on:
default: '[ "net462", "net8.0" ]'
required: false
type: string
test-case-filter:
required: false
type: string
test-require-elevated:
default: false
required: false
type: boolean
pack:
default: true
required: false
type: boolean

jobs:
build-test:
Expand Down Expand Up @@ -75,10 +90,6 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x

- name: dotnet restore ${{ steps.resolve-project.outputs.title }}
run: dotnet restore ${{ steps.resolve-project.outputs.project }} -p:EnablePackageValidation=true
Expand All @@ -87,30 +98,45 @@ jobs:
run: dotnet build ${{ steps.resolve-project.outputs.project }} --configuration Release --no-restore

- name: dotnet test ${{ steps.resolve-project.outputs.title }}
run: dotnet test ${{ steps.resolve-project.outputs.project }} --collect:"Code Coverage" --results-directory:TestResults --framework ${{ matrix.version }} --configuration Release --no-restore --no-build --logger:"console;verbosity=detailed" -- RunConfiguration.DisableAppDomain=true
if: ${{ inputs.run-tests }}
run: >
${{ inputs.test-require-elevated && matrix.os != 'windows-latest' && 'sudo -E' || '' }}
dotnet test ${{ steps.resolve-project.outputs.project }}
--collect:"Code Coverage"
--results-directory:TestResults
--framework ${{ matrix.version }}
--configuration Release
--no-restore
--no-build
--logger:"console;verbosity=detailed"
--filter "${{ inputs.test-case-filter }}"
-- RunConfiguration.DisableAppDomain=true
${{ inputs.test-require-elevated && matrix.os != 'windows-latest' && '&& sudo chmod a+rw ./TestResults' || '' }}
- name: dotnet pack ${{ steps.resolve-project.outputs.title }}
if: ${{ matrix.os == 'windows-latest' }}
if: ${{ matrix.os == 'windows-latest' && inputs.pack }}
run: dotnet pack ${{ steps.resolve-project.outputs.project }} --configuration Release --no-restore --no-build -p:EnablePackageValidation=true

- name: Install coverage tool
if: ${{ inputs.run-tests }}
run: dotnet tool install -g dotnet-coverage

- name: Merging test results
if: ${{ hashFiles('./TestResults/**/*.coverage') != '' }}
if: ${{ inputs.run-tests && hashFiles('./TestResults/**/*.coverage') != '' }}
run: dotnet-coverage merge -f cobertura -o ./TestResults/Cobertura.xml ./TestResults/**/*.coverage

- name: Upload code coverage ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
if: ${{ hashFiles('./TestResults/Cobertura.xml') != '' }}
if: ${{ inputs.run-tests && hashFiles('./TestResults/Cobertura.xml') != '' }}
uses: codecov/codecov-action@v4
continue-on-error: true # Note: Don't fail for upload failures
env:
OS: ${{ matrix.os }}
TFM: ${{ matrix.version }}
FILTER: ${{ inputs.test-case-filter }}
token: ${{ secrets.CODECOV_TOKEN }}
with:
file: TestResults/Cobertura.xml
env_vars: OS,TFM
env_vars: OS,TFM,FILTER
flags: ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }}
name: Code Coverage for ${{ inputs.code-cov-prefix }}-${{ inputs.code-cov-name }} on [${{ matrix.os }}.${{ matrix.version }}]
codecov_yml_path: .github/codecov.yml
Loading

0 comments on commit 166c7ab

Please sign in to comment.