Bump dorny/paths-filter from 3 to 4 in /.github/workflows (#537) #1431
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
| # Run Mathematics.NET Unit Tests | |
| name: Unit Tests | |
| on: | |
| push: | |
| branches: [ main, dev ] | |
| pull_request: | |
| branches: [ main, dev ] | |
| jobs: | |
| changes: | |
| name: Detect Changes | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| runs-on: ubuntu-latest | |
| outputs: | |
| mathematics: ${{ steps.filters.outputs.mathematics }} | |
| source_generators: ${{ steps.filters.outputs.source_generators }} | |
| source_generators_internal: ${{ steps.filters.outputs.source_generators_internal }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| - name: Filter Changes | |
| id: filters | |
| uses: | |
| dorny/paths-filter@v4 | |
| with: | |
| filters: | | |
| mathematics: | |
| - src/Mathematics.NET/** | |
| source_generators: | |
| - src/Mathematics.NET.SourceGenerators/** | |
| source_generators_internal: | |
| - src/Mathematics.NET.SourceGenerators.Internal/** | |
| mathematics: | |
| name: Run Mathematics.NET Unit Tests | |
| needs: changes | |
| if: ${{ needs.changes.outputs.mathematics == 'true' }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest, macos-latest ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 9.x | |
| 10.x | |
| - name: Restore Dependencies | |
| run: dotnet restore | |
| - name: Build Test Project | |
| working-directory: tests/Mathematics.NET.UnitTests | |
| run: dotnet build --no-restore | |
| - name: Run Tests | |
| working-directory: tests/Mathematics.NET.UnitTests | |
| run: dotnet test --no-build --verbosity normal | |
| source_generators: | |
| name: Run Mathematics.NET.SourceGenerators Unit Tests | |
| needs: changes | |
| if: ${{ needs.changes.outputs.source_generators == 'true' }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest, macos-latest ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 9.x | |
| 10.x | |
| - name: Restore Dependencies | |
| run: dotnet restore | |
| - name: Build Test Project | |
| working-directory: tests/Mathematics.NET.SourceGenerators.UnitTests | |
| run: dotnet build --no-restore | |
| - name: Run Tests | |
| working-directory: tests/Mathematics.NET.SourceGenerators.UnitTests | |
| run: dotnet test --no-build --verbosity normal | |
| source_generators_internal: | |
| name: Run Mathematics.NET.SourceGenerators.Internal Unit Tests | |
| needs: changes | |
| if: ${{ needs.changes.outputs.source_generators_internal == 'true' }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest, macos-latest ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 9.x | |
| 10.x | |
| - name: Restore Dependencies | |
| run: dotnet restore | |
| - name: Build Test Project | |
| working-directory: tests/Mathematics.NET.SourceGenerators.Internal.UnitTests | |
| run: dotnet build --no-restore | |
| - name: Run Tests | |
| working-directory: tests/Mathematics.NET.SourceGenerators.Internal.UnitTests | |
| run: dotnet test --no-build --verbosity normal |