Repository navigation
Apply ReSharper full cleanup - idempotent on both platforms #12
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: ['**'] | |
| pull_request: | |
| branches: [main, develop] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| DisableRealDriverIO: "1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| dotnet-quality: 'preview' | |
| - name: Restore | |
| run: dotnet restore Examples.sln | |
| - name: Restore dotnet tools | |
| run: dotnet tool restore | |
| - name: Build | |
| run: dotnet build Examples.sln --no-restore | |
| # Style gate runs once (Linux). dotnet format catches whitespace/analyzer drift; | |
| # jb cleanupcode catches what dotnet format misses (space before new(), var usage, | |
| # expression-bodied members, using sorting). | |
| - name: Verify code style — dotnet format | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| dotnet format Examples.sln --no-restore --verify-no-changes \ | |
| --exclude tests/ | |
| - name: Verify code style — ReSharper cleanupcode | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| dotnet jb cleanupcode Examples.sln \ | |
| --profile="Built-in: Full Cleanup" \ | |
| --no-build \ | |
| || true | |
| if ! git diff --exit-code; then | |
| echo "::error::ReSharper code cleanup found style drift. Run 'dotnet jb cleanupcode Examples.sln --profile=\"Built-in: Full Cleanup\" --no-build' locally and commit the result." | |
| exit 1 | |
| fi | |
| - name: Smoke Tests | |
| run: dotnet test tests/Examples.SmokeTests |