From 232e82eb029b6e9f2287ce25b5cb3263c9c9cf4e Mon Sep 17 00:00:00 2001 From: Eddy Nakamura Date: Wed, 1 Jul 2020 17:04:22 -0300 Subject: [PATCH] github actions (#752) moving folder updating test to Tests.dll and folder to get less files updating folder again adding other versions to test Adding linux and renaming updating ubuntu version updating yml linux adding variables and using matrix adding strategy to matrix updating variables new test updating variables updating variables updating test packages trying to add cache option testing cache on windows removing cache folder and trying to optmize files updating adding more workflows to test parallel updating windows one job pipeline updating renaming updating updating test adding verbose and breaking one test to double check reverting test, adding new line, removing verbose from parallel Update dotnet-core.yml Update dotnet-core.yml updating fetch depth fetching all Co-authored-by: Cijo Thomas --- .github/workflows/dotnet-core-linux.yml | 30 ++++++++++++++ .github/workflows/dotnet-core-win.yml | 30 ++++++++++++++ .github/workflows/dotnet-core.yml | 41 +++++++++++++++++++ ...OpenTelemetry.Exporter.Jaeger.Tests.csproj | 4 +- ...xporter.OpenTelemetryProtocol.Tests.csproj | 7 +++- ...Telemetry.Exporter.Prometheus.Tests.csproj | 4 +- ...OpenTelemetry.Exporter.Zipkin.Tests.csproj | 4 +- ...nTelemetry.Extensions.Hosting.Tests.csproj | 4 +- ...ry.Instrumentation.AspNet.Tests.Win.csproj | 4 +- ...ry.Instrumentation.AspNetCore.Tests.csproj | 4 +- ....Instrumentation.Dependencies.Tests.csproj | 4 +- ...umentation.StackExchangeRedis.Tests.csproj | 4 +- ...enTelemetry.Shims.OpenTracing.Tests.csproj | 4 +- .../OpenTelemetry.Tests.csproj | 4 +- 14 files changed, 126 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/dotnet-core-linux.yml create mode 100644 .github/workflows/dotnet-core-win.yml create mode 100644 .github/workflows/dotnet-core.yml diff --git a/.github/workflows/dotnet-core-linux.yml b/.github/workflows/dotnet-core-linux.yml new file mode 100644 index 000000000..88e86d4ab --- /dev/null +++ b/.github/workflows/dotnet-core-linux.yml @@ -0,0 +1,30 @@ +name: .NET Linux + +on: + pull_request: + branches: [ master ] + +jobs: + build-test: + runs-on: ubuntu-latest + + strategy: + matrix: + version: [netcoreapp3.1] + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.x + + - name: Install dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Test ${{ matrix.version }} + run: dotnet test **/bin/**/${{ matrix.version }}/*.Tests.dll diff --git a/.github/workflows/dotnet-core-win.yml b/.github/workflows/dotnet-core-win.yml new file mode 100644 index 000000000..eb49c8504 --- /dev/null +++ b/.github/workflows/dotnet-core-win.yml @@ -0,0 +1,30 @@ +name: .NET Windows + +on: + pull_request: + branches: [ master ] + +jobs: + build-test: + runs-on: windows-latest + + strategy: + matrix: + version: [net452,net46,net461,netcoreapp3.1] + + steps: + - uses: actions/checkout@v2 + + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.x + + - name: Install dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Test ${{ matrix.version }} + run: dotnet test **\bin\**\${{ matrix.version }}\*Tests.dll diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml new file mode 100644 index 000000000..8f6d46169 --- /dev/null +++ b/.github/workflows/dotnet-core.yml @@ -0,0 +1,41 @@ +name: .NET + +on: + pull_request: + branches: [ master ] + +jobs: + build-test: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [windows-latest, ubuntu-latest] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # fetching all + + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.x + + - name: Install dependencies + run: dotnet restore + + - name: dotnet build + run: dotnet build --configuration Release --no-restore + + - name: dotnet test + run: dotnet test -p:CollectCoverage=false --configuration Release --no-restore --logger:"console;verbosity=detailed" + + - name: dotnet pack + run: dotnet pack OpenTelemetry.proj --configuration Release --no-restore + + - name: Publish Artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.os }}-packages + path: '**/bin/**/*.*nupkg' diff --git a/test/OpenTelemetry.Exporter.Jaeger.Tests/OpenTelemetry.Exporter.Jaeger.Tests.csproj b/test/OpenTelemetry.Exporter.Jaeger.Tests/OpenTelemetry.Exporter.Jaeger.Tests.csproj index b11c0cfaa..9a443f62d 100644 --- a/test/OpenTelemetry.Exporter.Jaeger.Tests/OpenTelemetry.Exporter.Jaeger.Tests.csproj +++ b/test/OpenTelemetry.Exporter.Jaeger.Tests/OpenTelemetry.Exporter.Jaeger.Tests.csproj @@ -14,10 +14,10 @@ - + - + all runtime; build; native; contentfiles; analyzers diff --git a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj index 30340b92d..29d0877d9 100644 --- a/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj +++ b/test/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests/OpenTelemetry.Exporter.OpenTelemetryProtocol.Tests.csproj @@ -7,10 +7,13 @@ - + - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/test/OpenTelemetry.Exporter.Prometheus.Tests/OpenTelemetry.Exporter.Prometheus.Tests.csproj b/test/OpenTelemetry.Exporter.Prometheus.Tests/OpenTelemetry.Exporter.Prometheus.Tests.csproj index 6e929a371..d0c4808bf 100644 --- a/test/OpenTelemetry.Exporter.Prometheus.Tests/OpenTelemetry.Exporter.Prometheus.Tests.csproj +++ b/test/OpenTelemetry.Exporter.Prometheus.Tests/OpenTelemetry.Exporter.Prometheus.Tests.csproj @@ -8,9 +8,9 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/test/OpenTelemetry.Exporter.Zipkin.Tests/OpenTelemetry.Exporter.Zipkin.Tests.csproj b/test/OpenTelemetry.Exporter.Zipkin.Tests/OpenTelemetry.Exporter.Zipkin.Tests.csproj index 124db2e44..642217d3c 100644 --- a/test/OpenTelemetry.Exporter.Zipkin.Tests/OpenTelemetry.Exporter.Zipkin.Tests.csproj +++ b/test/OpenTelemetry.Exporter.Zipkin.Tests/OpenTelemetry.Exporter.Zipkin.Tests.csproj @@ -18,10 +18,10 @@ - + - + all runtime; build; native; contentfiles; analyzers diff --git a/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj b/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj index 64288fb2f..7b03c64ec 100644 --- a/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj +++ b/test/OpenTelemetry.Extensions.Hosting.Tests/OpenTelemetry.Extensions.Hosting.Tests.csproj @@ -11,10 +11,10 @@ - + - + all runtime; build; native; contentfiles; analyzers diff --git a/test/OpenTelemetry.Instrumentation.AspNet.Tests.Win/OpenTelemetry.Instrumentation.AspNet.Tests.Win.csproj b/test/OpenTelemetry.Instrumentation.AspNet.Tests.Win/OpenTelemetry.Instrumentation.AspNet.Tests.Win.csproj index 9cbed8ba4..e2e908bb9 100644 --- a/test/OpenTelemetry.Instrumentation.AspNet.Tests.Win/OpenTelemetry.Instrumentation.AspNet.Tests.Win.csproj +++ b/test/OpenTelemetry.Instrumentation.AspNet.Tests.Win/OpenTelemetry.Instrumentation.AspNet.Tests.Win.csproj @@ -15,10 +15,10 @@ - + - + all runtime; build; native; contentfiles; analyzers diff --git a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj index cdb056f47..eaf615afe 100644 --- a/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj +++ b/test/OpenTelemetry.Instrumentation.AspNetCore.Tests/OpenTelemetry.Instrumentation.AspNetCore.Tests.csproj @@ -15,10 +15,10 @@ - + - + all runtime; build; native; contentfiles; analyzers diff --git a/test/OpenTelemetry.Instrumentation.Dependencies.Tests/OpenTelemetry.Instrumentation.Dependencies.Tests.csproj b/test/OpenTelemetry.Instrumentation.Dependencies.Tests/OpenTelemetry.Instrumentation.Dependencies.Tests.csproj index 09b577da0..442176af6 100644 --- a/test/OpenTelemetry.Instrumentation.Dependencies.Tests/OpenTelemetry.Instrumentation.Dependencies.Tests.csproj +++ b/test/OpenTelemetry.Instrumentation.Dependencies.Tests/OpenTelemetry.Instrumentation.Dependencies.Tests.csproj @@ -21,10 +21,10 @@ - + - + all runtime; build; native; contentfiles; analyzers diff --git a/test/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests.csproj b/test/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests.csproj index 5b523e1f8..9b411eb09 100644 --- a/test/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests.csproj +++ b/test/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests/OpenTelemetry.Instrumentation.StackExchangeRedis.Tests.csproj @@ -11,10 +11,10 @@ - + - + all runtime; build; native; contentfiles; analyzers diff --git a/test/OpenTelemetry.Shims.OpenTracing.Tests/OpenTelemetry.Shims.OpenTracing.Tests.csproj b/test/OpenTelemetry.Shims.OpenTracing.Tests/OpenTelemetry.Shims.OpenTracing.Tests.csproj index fe3858768..f513b40a3 100644 --- a/test/OpenTelemetry.Shims.OpenTracing.Tests/OpenTelemetry.Shims.OpenTracing.Tests.csproj +++ b/test/OpenTelemetry.Shims.OpenTracing.Tests/OpenTelemetry.Shims.OpenTracing.Tests.csproj @@ -5,10 +5,10 @@ - + - + all runtime; build; native; contentfiles; analyzers diff --git a/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj b/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj index 7e149086e..8f0a3c3a3 100644 --- a/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj +++ b/test/OpenTelemetry.Tests/OpenTelemetry.Tests.csproj @@ -22,10 +22,10 @@ - + - + all runtime; build; native; contentfiles; analyzers