From ca3be121bb41a77d2048bc7640cc8db6af778198 Mon Sep 17 00:00:00 2001 From: Alex Peck Date: Sat, 1 Oct 2022 14:04:41 -0700 Subject: [PATCH 1/4] trx --- .github/workflows/gate.yml | 17 ++++++++++++++--- .github/workflows/mac-gate.yml | 13 +++++++++++-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index e1c9838c..af798e13 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -1,9 +1,11 @@ -name: Build and Test (windows-latest) +name: CI (win) on: push: + paths-ignore: [ '**.md' ] branches: [ main ] pull_request: + paths-ignore: [ '**.md' ] branches: [ main ] jobs: @@ -22,7 +24,7 @@ jobs: - name: Build run: dotnet build --configuration Release --no-restore - name: Test - run: dotnet test --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov + run: dotnet test --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov --logger "trx;LogFileName=results.trx" - name: Publish NuGet artifacts uses: actions/upload-artifact@v3 with: @@ -32,4 +34,13 @@ jobs: uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.info \ No newline at end of file + path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.info + - name: Generate test report + uses: phoenix-actions/test-reporting@v8 + id: unit-test-report + if: success() || failure() + with: + name: test results + path: BitFaster.Caching.UnitTests/TestResults/results.trx + reporter: dotnet-trx + only-summary: 'true' diff --git a/.github/workflows/mac-gate.yml b/.github/workflows/mac-gate.yml index 8f5b913a..96801b6c 100644 --- a/.github/workflows/mac-gate.yml +++ b/.github/workflows/mac-gate.yml @@ -1,4 +1,4 @@ -name: Build and Test (macos-latest) +name: CI (mac) on: push: @@ -22,4 +22,13 @@ jobs: - name: Build run: dotnet build --configuration Release --no-restore - name: Test - run: dotnet test --no-restore --verbosity normal + run: dotnet test --no-restore --verbosity normal --logger "trx;LogFileName=results.trx" + - name: Generate test report + uses: phoenix-actions/test-reporting@v8 + id: unit-test-report + if: success() || failure() + with: + name: test results + path: BitFaster.Caching.UnitTests/TestResults/results.trx + reporter: dotnet-trx + only-summary: 'true' From 6e942a45601bccb39686734334868d14320e2db2 Mon Sep 17 00:00:00 2001 From: Alex Peck Date: Sat, 1 Oct 2022 14:11:49 -0700 Subject: [PATCH 2/4] rename --- .github/workflows/gate.yml | 2 +- .github/workflows/mac-gate.yml | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index af798e13..8a5d747f 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -35,7 +35,7 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.info - - name: Generate test report + - name: Generate unit test report uses: phoenix-actions/test-reporting@v8 id: unit-test-report if: success() || failure() diff --git a/.github/workflows/mac-gate.yml b/.github/workflows/mac-gate.yml index 96801b6c..83bf5af9 100644 --- a/.github/workflows/mac-gate.yml +++ b/.github/workflows/mac-gate.yml @@ -2,8 +2,10 @@ name: CI (mac) on: push: + paths-ignore: [ '**.md' ] branches: [ main ] pull_request: + paths-ignore: [ '**.md' ] branches: [ main ] jobs: @@ -22,8 +24,13 @@ jobs: - name: Build run: dotnet build --configuration Release --no-restore - name: Test - run: dotnet test --no-restore --verbosity normal --logger "trx;LogFileName=results.trx" - - name: Generate test report + run: dotnet test --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov --logger "trx;LogFileName=results.trx" + - name: Publish coverage report to coveralls.io + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.info + - name: Generate unit test report uses: phoenix-actions/test-reporting@v8 id: unit-test-report if: success() || failure() From 2eeb1a72a0616edb96758d5b0d85583a56b1b1d4 Mon Sep 17 00:00:00 2001 From: Alex Peck Date: Sat, 1 Oct 2022 14:18:05 -0700 Subject: [PATCH 3/4] ids --- .github/workflows/gate.yml | 2 +- .github/workflows/mac-gate.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index 8a5d747f..d16ecb5a 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -37,7 +37,7 @@ jobs: path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.info - name: Generate unit test report uses: phoenix-actions/test-reporting@v8 - id: unit-test-report + id: unit-test-report-win if: success() || failure() with: name: test results diff --git a/.github/workflows/mac-gate.yml b/.github/workflows/mac-gate.yml index 83bf5af9..c15022b7 100644 --- a/.github/workflows/mac-gate.yml +++ b/.github/workflows/mac-gate.yml @@ -32,7 +32,7 @@ jobs: path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.info - name: Generate unit test report uses: phoenix-actions/test-reporting@v8 - id: unit-test-report + id: unit-test-report-mac if: success() || failure() with: name: test results From 5cb596577e0f6fbcc680506c0eb85a73e0a70709 Mon Sep 17 00:00:00 2001 From: Alex Peck Date: Sat, 1 Oct 2022 14:24:16 -0700 Subject: [PATCH 4/4] name --- .github/workflows/gate.yml | 4 +++- .github/workflows/mac-gate.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index d16ecb5a..b0500f86 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -35,12 +35,14 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.info + flag-name: win + parallel: true - name: Generate unit test report uses: phoenix-actions/test-reporting@v8 id: unit-test-report-win if: success() || failure() with: - name: test results + name: test results (win) path: BitFaster.Caching.UnitTests/TestResults/results.trx reporter: dotnet-trx only-summary: 'true' diff --git a/.github/workflows/mac-gate.yml b/.github/workflows/mac-gate.yml index c15022b7..72ec5b53 100644 --- a/.github/workflows/mac-gate.yml +++ b/.github/workflows/mac-gate.yml @@ -30,12 +30,14 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: BitFaster.Caching.UnitTests/TestResults/coverage.info + flag-name: mac + parallel: true - name: Generate unit test report uses: phoenix-actions/test-reporting@v8 id: unit-test-report-mac if: success() || failure() with: - name: test results + name: test results (mac) path: BitFaster.Caching.UnitTests/TestResults/results.trx reporter: dotnet-trx only-summary: 'true'