
variables:
  BuildConfiguration: Release

jobs:
  - job: Windows
    pool:
      vmImage: windows-latest
    steps:
      - task: DotNetCoreCLI@2
        displayName: Build
        inputs:
          command: build
          projects: src/Abc.Zebus.sln
          arguments: --configuration $(BuildConfiguration)

      - task: DotNetCoreCLI@2
        displayName: Test
        inputs:
          command: test
          projects: src/**/*.Tests.csproj
          arguments: --configuration $(BuildConfiguration)

      - task: DotNetCoreCLI@2
        displayName: Pack
        inputs:
          command: pack
          configuration: $(BuildConfiguration)
          packDirectory: $(Build.ArtifactStagingDirectory)
          verbosityPack: Minimal

      - task: PublishBuildArtifacts@1
        displayName: Publish Artifacts
        inputs:
          ArtifactName: NuGet

  - job: Linux
    pool:
      vmImage: ubuntu-latest
    steps:
      - task: DotNetCoreCLI@2
        displayName: Build
        inputs:
          command: build
          projects: src/Abc.Zebus.Tests/Abc.Zebus.Tests.csproj
          arguments: --configuration $(BuildConfiguration) --framework netcoreapp3.1

      - task: DotNetCoreCLI@2
        displayName: Test
        inputs:
          command: test
          projects: src/Abc.Zebus.Tests/Abc.Zebus.Tests.csproj
          arguments: --configuration $(BuildConfiguration) --framework netcoreapp3.1


variables:
  BuildConfiguration: Release
  LinuxTargetFramework: netcoreapp3.1

jobs:
  - job: Windows
    pool:
      vmImage: windows-latest
    steps:
      - task: DotNetCoreCLI@2
        displayName: Build
        inputs:
          command: build
          projects: src/Abc.Zebus.sln
          arguments: --configuration $(BuildConfiguration)

      - task: DotNetCoreCLI@2
        displayName: Test
        inputs:
          command: test
          projects: src/**/*.Tests.csproj
          arguments: --configuration $(BuildConfiguration)

      - task: DotNetCoreCLI@2
        displayName: Pack
        inputs:
          command: pack
          configuration: $(BuildConfiguration)
          packDirectory: $(Build.ArtifactStagingDirectory)
          verbosityPack: Minimal

      - task: PublishBuildArtifacts@1
        displayName: Publish Artifacts
        inputs:
          ArtifactName: NuGet

  - job: Linux
    pool:
      vmImage: ubuntu-latest
    steps:
      - task: DotNetCoreCLI@2
        displayName: Build
        inputs:
          command: build
          projects: src/**/*.Tests.csproj
          arguments: --configuration $(BuildConfiguration) --framework $(LinuxTargetFramework)

      - task: DotNetCoreCLI@2
        displayName: Test
        inputs:
          command: test
          projects: src/**/*.Tests.csproj
          arguments: --configuration $(BuildConfiguration) --framework $(LinuxTargetFramework)

Enable all test projects on Linux
Enable all test projects on Linux
