feat(ReFrontier): add --diff option for structural file comparison #50
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: CI | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| dotnet-version: ['8.0.x'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: ${{ matrix.dotnet-version }} | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore --configuration Release | |
| - name: Test | |
| run: dotnet test --no-build --configuration Release --verbosity normal | |
| test-coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Run tests with coverage | |
| run: | | |
| dotnet test ./ReFrontier.Tests/ReFrontier.Tests.csproj \ | |
| --collect:"XPlat Code Coverage" \ | |
| --logger "console;verbosity=detailed" | |
| - name: Find coverage files | |
| run: | | |
| echo "=== All XML files ===" | |
| find . -name "*.xml" -type f 2>/dev/null | |
| echo "=== TestResults contents ===" | |
| find . -path "*/TestResults/*" -type f 2>/dev/null | |
| - name: Install ReportGenerator | |
| run: dotnet tool install -g dotnet-reportgenerator-globaltool | |
| - name: Generate coverage report | |
| run: | | |
| COVERAGE_FILE=$(find . -name "coverage.cobertura.xml" -type f | head -1) | |
| if [ -n "$COVERAGE_FILE" ]; then | |
| echo "Found coverage file: $COVERAGE_FILE" | |
| reportgenerator \ | |
| -reports:"$COVERAGE_FILE" \ | |
| -targetdir:"coveragereport" \ | |
| -reporttypes:"Html;MarkdownSummaryGithub" | |
| else | |
| echo "No coverage file found" | |
| mkdir -p coveragereport | |
| echo "# Coverage Report" > coveragereport/SummaryGithub.md | |
| echo "" >> coveragereport/SummaryGithub.md | |
| echo "Coverage file not generated. Check test output above." >> coveragereport/SummaryGithub.md | |
| exit 1 | |
| fi | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-report | |
| path: coveragereport | |
| - name: Write coverage summary | |
| if: always() | |
| run: cat coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY |