build: update build and test targets #87
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: | |
| - main | |
| - dev | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| config: "Release" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET Core 6.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 6.0.x | |
| - name: Setup .NET Core 7.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 7.0.x | |
| - name: Setup .NET Core 8.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Setup .NET Core 9.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --configuration $config --no-restore | |
| - name: Test net6.0 | |
| run: dotnet test src/NetCoreForce.Client.Tests --configuration $config --no-restore --no-build --verbosity normal --framework net6.0 | |
| - name: Test net7.0 | |
| run: dotnet test src/NetCoreForce.Client.Tests --configuration $config --no-restore --no-build --verbosity normal --framework net7.0 | |
| - name: Test net8.0 | |
| run: dotnet test src/NetCoreForce.Client.Tests --configuration $config --no-restore --no-build --verbosity normal --framework net8.0 | |
| - name: Test net9.0 | |
| run: dotnet test src/NetCoreForce.Client.Tests --configuration $config --no-restore --no-build --verbosity normal --framework net9.0 | |
| - name: Upload nuget artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nuget-package | |
| path: ${{github.workspace}}/packages/NetCoreForce.*.nupkg |