Refactor: Focus on JSON Viewer Component #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ποΈ Build & Test | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| env: | |
| DOTNET_VERSION: '7.0.x' | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | |
| DOTNET_NOLOGO: true | |
| jobs: | |
| build: | |
| name: π¨ Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π₯ Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Ψ¨Ψ±Ψ§Ϋ GitVersion | |
| - name: βοΈ Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: π¦ Restore dependencies | |
| run: dotnet restore JsonViewer.Blazor.sln | |
| - name: ποΈ Build | |
| run: dotnet build JsonViewer.Blazor.sln --no-restore --configuration Release | |
| - name: π§ͺ Test | |
| run: dotnet test JsonViewer.Blazor.sln --no-build --configuration Release --verbosity normal | |
| - name: π Code Coverage | |
| run: | | |
| dotnet test JsonViewer.Blazor.sln \ | |
| --no-build \ | |
| --configuration Release \ | |
| --collect:"XPlat Code Coverage" \ | |
| --results-directory ./coverage | |
| - name: π€ Upload Coverage | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| directory: ./coverage | |
| fail_ci_if_error: false | |
| analyze: | |
| name: π Code Analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π₯ Checkout | |
| uses: actions/checkout@v4 | |
| - name: βοΈ Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ env.DOTNET_VERSION }} | |
| - name: π Format Check | |
| run: dotnet format JsonViewer.Blazor.sln --verify-no-changes --no-restore | |
| - name: π Code Analysis | |
| run: dotnet build JsonViewer.Blazor.sln -warnaserror | |