diff --git a/.github/workflows/gate.yml b/.github/workflows/gate.yml index b0500f86..5058cca2 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: - build: + win: runs-on: windows-latest @@ -46,3 +46,46 @@ jobs: path: BitFaster.Caching.UnitTests/TestResults/results.trx reporter: dotnet-trx only-summary: 'true' + + mac: + + 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: [win, mac] + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} + parallel-finished: true \ No newline at end of file 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'