From 255a44797c1316d465d6da4d78afd9ec3ca9a5eb Mon Sep 17 00:00:00 2001 From: Alex Peck Date: Sat, 1 Oct 2022 15:06:54 -0700 Subject: [PATCH 1/5] unify --- .github/workflows/gate.yml | 46 +++++++++++++++++++++++++++++++++- .github/workflows/mac-gate.yml | 43 ------------------------------- 2 files changed, 45 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/mac-gate.yml diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index b0500f86..60d1be52 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -9,7 +9,7 @@ on: branches: [ main ] jobs: - build: + buildwin: runs-on: windows-latest @@ -46,3 +46,47 @@ jobs: path: BitFaster.Caching.UnitTests/TestResults/results.trx reporter: dotnet-trx only-summary: 'true' + + buildmac: + + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET Core + uses: actions/setup-dotnet@v2 + with: + dotnet-version: 6.0.x + - name: Install dependencies + run: dotnet restore + - 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 --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 + 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 (mac) + path: BitFaster.Caching.UnitTests/TestResults/results.trx + reporter: dotnet-trx + only-summary: 'true' + + finish: + needs: [buildwin, buildmac] + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true + diff --git a/.github/workflows/mac-gate.yml b/.github/workflows/mac-gate.yml deleted file mode 100644 index 72ec5b53..00000000 --- a/.github/workflows/mac-gate.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: CI (mac) - -on: - push: - paths-ignore: [ '**.md' ] - branches: [ main ] - pull_request: - paths-ignore: [ '**.md' ] - branches: [ main ] - -jobs: - build: - - runs-on: macos-latest - - steps: - - uses: actions/checkout@v3 - - name: Setup .NET Core - uses: actions/setup-dotnet@v2 - with: - dotnet-version: 6.0.x - - name: Install dependencies - run: dotnet restore - - 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 --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 - 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 (mac) - path: BitFaster.Caching.UnitTests/TestResults/results.trx - reporter: dotnet-trx - only-summary: 'true' From 751e9a91e69206008c6e08ef058a687f3a4bee17 Mon Sep 17 00:00:00 2001 From: Alex Peck Date: Sat, 1 Oct 2022 15:13:50 -0700 Subject: [PATCH 2/5] rename --- .github/workflows/gate.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index 60d1be52..22b93c02 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -1,4 +1,4 @@ -name: CI (win) +name: Build on: push: @@ -9,7 +9,7 @@ on: branches: [ main ] jobs: - buildwin: + win: runs-on: windows-latest @@ -47,7 +47,7 @@ jobs: reporter: dotnet-trx only-summary: 'true' - buildmac: + mac: runs-on: macos-latest @@ -81,7 +81,7 @@ jobs: only-summary: 'true' finish: - needs: [buildwin, buildmac] + needs: [win, mac] runs-on: ubuntu-latest steps: - name: Coveralls Finished From 5e9371c7d62d8fbe4f42e94d12deb10962ae5285 Mon Sep 17 00:00:00 2001 From: Alex Peck Date: Sat, 1 Oct 2022 15:33:04 -0700 Subject: [PATCH 3/5] ws --- .github/workflows/gate.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index 22b93c02..5058cca2 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -88,5 +88,4 @@ jobs: uses: coverallsapp/github-action@master with: github-token: ${{ secrets.github_token }} - parallel-finished: true - + parallel-finished: true \ No newline at end of file From 99d92e3534c22f8fd8bd52867cb467447b415c77 Mon Sep 17 00:00:00 2001 From: Alex Peck Date: Sat, 1 Oct 2022 15:42:44 -0700 Subject: [PATCH 4/5] rename --- .github/workflows/gate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index 5058cca2..f4dcb517 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -80,7 +80,7 @@ jobs: reporter: dotnet-trx only-summary: 'true' - finish: + coverage: needs: [win, mac] runs-on: ubuntu-latest steps: From 3e8a4744393190572ac07b543dd4302a2ee8fd5c Mon Sep 17 00:00:00 2001 From: Alex Peck Date: Sat, 1 Oct 2022 15:50:41 -0700 Subject: [PATCH 5/5] UPPERCASE --- .github/workflows/gate.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index f4dcb517..ff9e68e3 100644 --- a/.github/workflows/gate.yml +++ b/.github/workflows/gate.yml @@ -81,11 +81,14 @@ jobs: only-summary: 'true' coverage: + needs: [win, mac] + runs-on: ubuntu-latest + steps: - name: Coveralls Finished uses: coverallsapp/github-action@master with: - github-token: ${{ secrets.github_token }} + github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true \ No newline at end of file