diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 57ff106..e66973d 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -4,6 +4,11 @@ on: pull_request: branches: [ "main" ] +permissions: + contents: read + checks: write + pull-requests: write + jobs: build-and-test: runs-on: ${{ matrix.os }} @@ -22,4 +27,11 @@ jobs: - name: Build run: dotnet build --no-restore --configuration Release - name: Test - run: dotnet test --no-build --verbosity normal --configuration Release \ No newline at end of file + run: dotnet test --no-build --verbosity normal --configuration Release --logger trx + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() + with: + files: '**/TestResults/*.trx' + check_name: 'Test Results' + large_files: true \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bce6ad2..34d024c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,11 @@ on: push: branches: [ "main" ] +permissions: + contents: write + checks: write + pull-requests: write + jobs: check-version-tag: runs-on: ubuntu-latest @@ -68,7 +73,15 @@ jobs: run: dotnet build --no-restore --configuration Release - name: Test - run: dotnet test --no-build --verbosity normal --configuration Release + run: dotnet test --no-build --verbosity normal --configuration Release --logger trx + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: always() + with: + files: '**/TestResults/*.trx' + check_name: 'Test Results' + large_files: true publish-release: runs-on: ubuntu-latest