diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 85b5109..ef134e5 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -15,12 +15,16 @@ jobs: include: - os: ubuntu-latest targetPlatform: linux-x64 + skipTests: false - os: ubuntu-latest targetPlatform: linux-arm + skipTests: true - os: ubuntu-latest targetPlatform: linux-arm64 + skipTests: true - os: windows-latest targetPlatform: win-x64 + skipTests: false runs-on: ${{ matrix.os }} @@ -30,6 +34,7 @@ jobs: - name: Initialize test reporting uses: testspace-com/setup-testspace@v1 + if: ${{ !matrix.skipTests }} with: domain: ${{github.repository_owner}} @@ -44,17 +49,20 @@ jobs: - name: Test shell: bash + if: ${{ !matrix.skipTests }} run: | testExitCode=0 - dotnet test --runtime ${{ matrix.targetPlatform }} --verbosity normal --configuration Release --collect:"XPlat Code Coverage" --settings Tests/Tests.runsettings --logger "trx;LogFileName=TestResults.xml" || testExitCode=$? + dotnet test --runtime ${{ matrix.targetPlatform }} --configuration Release --collect:"XPlat Code Coverage" --settings Tests/Tests.runsettings --logger "trx;LogFileName=TestResults.xml" || testExitCode=$? echo "TEST_EXIT_CODE=$testExitCode" >> $GITHUB_ENV cp Tests/TestResults/*/coverage.info Tests/TestResults exit 0 - name: Upload test report + if: ${{ !matrix.skipTests }} run: testspace Tests/TestResults/TestResults.xml - name: Upload coverage report + if: ${{ !matrix.skipTests }} uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -62,6 +70,7 @@ jobs: format: lcov - name: Stop if tests failed + if: ${{ !matrix.skipTests }} run: exit ${{ env.TEST_EXIT_CODE }} - name: Upload build artifacts