Skip to content

Commit

Permalink
merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
Yun-Ting committed Nov 17, 2023
2 parents f1f7de7 + d346196 commit 3e20026
Show file tree
Hide file tree
Showing 868 changed files with 45,364 additions and 42,858 deletions.
3 changes: 2 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ csharp_indent_switch_labels = true
csharp_indent_labels = flush_left

# Modifier preferences
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent

# this. preferences
Expand Down Expand Up @@ -106,6 +106,7 @@ csharp_style_prefer_index_operator = false:none
csharp_style_prefer_range_operator = false:none
csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_namespace_declarations = file_scoped:warning

# Space preferences
csharp_space_after_cast = false
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/apicompatibility.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/ci-aot-md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
# See also: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks

# Description: This workflow exists to unblock documentation-only PRs.

# IMPORTANT: This workflow MUST use the same 'name' and 'matrix' as the non -md workflow.

name: Publish AOTCompatibility testApp

on:
pull_request:
branches: [ 'main*' ]
paths:
- '**.md'

jobs:
aot-test:
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
os: [ ubuntu-latest ]
version: [ net8.0 ]

runs-on: ${{ matrix.os }}
steps:
- run: 'echo "No build required"'
32 changes: 32 additions & 0 deletions .github/workflows/ci-aot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish AOTCompatibility testApp

on:
push:
branches: [ 'main*' ]
paths-ignore:
- '**.md'
pull_request:
branches: [ 'main*' ]
paths-ignore:
- '**.md'

jobs:
aot-test:
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
os: [ ubuntu-latest ]
version: [ net8.0 ]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetching all

- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: publish AOT testApp, assert static analysis warning count, and run the app
shell: pwsh
run: .\build\test-aot-compatibility.ps1 ${{ matrix.version }}
33 changes: 33 additions & 0 deletions .github/workflows/ci-concurrency-md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
# See also: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks

# Description: This workflow exists to unblock documentation-only PRs.

# IMPORTANT: This workflow MUST use the same 'name' and 'matrix' as the non -md workflow.


name: Coyote Concurrency Tests

on:
push:
branches: [ 'main*' ]
paths-ignore:
- '**.md'
pull_request:
branches: [ 'main*' ]
paths:
- '**.md'

jobs:
coyote-concurrency-tests:

strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
os: [ windows-latest, ubuntu-latest ]
version: [ net8.0 ]
project: [ OpenTelemetry.Tests, OpenTelemetry.Api.Tests ]

runs-on: ${{ matrix.os }}
steps:
- run: 'echo "No build required"'
41 changes: 41 additions & 0 deletions .github/workflows/ci-concurrency.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Coyote Concurrency Tests

on:
push:
branches: [ 'main*' ]
paths-ignore:
- '**.md'
pull_request:
branches: [ 'main*' ]
paths-ignore:
- '**.md'

jobs:
coyote-concurrency-tests:

strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
os: [ windows-latest, ubuntu-latest ]
version: [ net8.0 ]
project: [ OpenTelemetry.Tests, OpenTelemetry.Api.Tests ]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetching all

- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Run Coyote Tests
shell: pwsh
run: .\build\test-threadSafety.ps1 -testProjectName ${{ matrix.project }} -targetFramework ${{ matrix.version }}

- name: Publish Artifacts
if: always() && !cancelled()
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.project }}-${{ matrix.version }}-coyoteoutput
path: '**/*_CoyoteOutput.*'
28 changes: 28 additions & 0 deletions .github/workflows/ci-instrumentation-libraries-md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
# See also: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks

# Description: This workflow exists to unblock documentation-only PRs.

# IMPORTANT: This workflow MUST use the same 'name' and 'matrix' as the non -md workflow.

name: Test instrumentation libraries

on:
pull_request:
branches: [ 'main*' ]
paths:
- '**.md'

jobs:
build-test:
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
version: [ net462, net6.0, net7.0, net8.0 ]
exclude:
- os: ubuntu-latest
version: net462

runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'
41 changes: 41 additions & 0 deletions .github/workflows/ci-instrumentation-libraries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test instrumentation libraries # test instrumentation libraries with latest stable version of API/SDK as they are packed against it

on:
push:
branches: [ 'main*' ]
paths-ignore:
- '**.md'
pull_request:
branches: [ 'main*' ]
paths-ignore:
- '**.md'

jobs:
build-test:
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
os: [ windows-latest, ubuntu-latest ]
version: [ net462, net6.0, net7.0, net8.0 ]
exclude:
- os: ubuntu-latest
version: net462

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetching all

- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: dotnet restore
run: dotnet restore ./build/InstrumentationLibraries.proj -p:RunningDotNetPack=true

- name: dotnet build
run: dotnet build ./build/InstrumentationLibraries.proj --configuration Release --no-restore -p:RunningDotNetPack=true

- name: dotnet test
run: dotnet test **/bin/Release/${{ matrix.version }}/OpenTelemetry.Instrumentation*.Tests.dll --framework ${{ matrix.version }} --configuration Release --no-restore --no-build --logger:"console;verbosity=detailed"
19 changes: 16 additions & 3 deletions .github/workflows/ci-md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Description: This workflow exists to unblock documentation-only PRs.

# IMPORTANT: This workflow MUST use the same 'name' as the non -md workflow.
# IMPORTANT: This workflow MUST use the same 'name' and 'matrix' as the non -md workflow.

name: Build

Expand All @@ -14,11 +14,24 @@ on:
- '**.md'

jobs:
build-test:
build-test-stable:
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
version: [ net462, net6.0, net7.0 ]
version: [ net462, net6.0, net7.0, net8.0 ]
exclude:
- os: ubuntu-latest
version: net462

runs-on: ubuntu-latest
steps:
- run: 'echo "No build required"'

build-test-experimental:
strategy:
matrix:
os: [ windows-latest, ubuntu-latest ]
version: [ net462, net6.0, net7.0, net8.0 ]
exclude:
- os: ubuntu-latest
version: net462
Expand Down
39 changes: 35 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,58 @@ on:
- '**.md'

jobs:
build-test:
build-test-stable:
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
os: [ windows-latest, ubuntu-latest ]
version: [ net462, net6.0, net7.0 ]
version: [ net462, net6.0, net7.0, net8.0 ]
exclude:
- os: ubuntu-latest
version: net462

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetching all

- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore --property:ExposeExperimentalFeatures=false

- name: Test ${{ matrix.version }}
run: dotnet test **/bin/**/${{ matrix.version }}/*.Tests.dll --logger:"console;verbosity=detailed"

build-test-experimental:
strategy:
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
matrix:
os: [ windows-latest, ubuntu-latest ]
version: [ net462, net6.0, net7.0, net8.0 ]
exclude:
- os: ubuntu-latest
version: net462

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetching all

- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore
run: dotnet build --configuration Release --no-restore --property:ExposeExperimentalFeatures=true

- name: Test ${{ matrix.version }}
run: dotnet test **/bin/**/${{ matrix.version }}/*.Tests.dll --logger:"console;verbosity=detailed"
29 changes: 14 additions & 15 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,33 @@ jobs:
os: [windows-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetching all

- name: Setup dotnet
uses: actions/setup-dotnet@v3

- name: Install dependencies
run: dotnet restore

- name: dotnet build
run: dotnet build --configuration Release --no-restore

# - name: dotnet test
# run: dotnet test --collect:"XPlat Code Coverage" --results-directory:"TestResults" --configuration Release --no-build -- RunConfiguration.DisableAppDomain=true

- name: dotnet test
run: dotnet test --collect:"Code Coverage" --results-directory:"TestResults" --configuration Release --no-build -- RunConfiguration.DisableAppDomain=true
- name: Build
run: dotnet build --configuration Release --no-restore --property:ExposeExperimentalFeatures=true

- name: Process code coverage
run: .\build\process-codecoverage.ps1
shell: powershell
- name: Test
run: dotnet test --collect:"Code Coverage" --results-directory:"TestResults" --configuration Release --no-restore --no-build -- RunConfiguration.DisableAppDomain=true

- name: Install report tool
run: dotnet tool install -g dotnet-reportgenerator-globaltool
- name: Install coverage tool
run: dotnet tool install -g dotnet-coverage

- name: Merging test results
run: reportgenerator -reports:TestResults/**/*.xml -targetdir:TestResults -reporttypes:Cobertura -assemblyFilters:"-microsoft.data.sqlclient*;-grpc.core*;-opentracing*"
run: dotnet-coverage merge -r -f cobertura -o ./TestResults/Cobertura.xml ./TestResults/*.coverage

- uses: codecov/codecov-action@v3.1.4
env:
OS: ${{ matrix.os }}
with:
file: TestResults/Cobertura.xml
env_vars: OS
flags: unittests
name: Code Coverage for ${{ matrix.os }}
Loading

0 comments on commit 3e20026

Please sign in to comment.