GitHub workflow #3
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: Run Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: windows-latest # Changed to Windows | |
| strategy: | |
| matrix: | |
| configuration: [Debug, Release] | |
| framework: [.NETFramework4.8, net7.0, net9.0] # Include .NET Framework and .NET versions | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: ${{ matrix.framework }} # Use matrix to specify .NET version | |
| - name: Restore dependencies | |
| run: dotnet restore NepDate.sln | |
| - name: Build | |
| run: dotnet build NepDate.sln --configuration ${{ matrix.configuration }} --framework ${{ matrix.framework }} --no-restore | |
| - name: Test | |
| run: dotnet test NepDate.sln --configuration ${{ matrix.configuration }} --framework ${{ matrix.framework }} --no-build --verbosity normal |