<commit_before>variables:
    buildConfiguration: Release
    SA_PASSWORD: <PASSWORD>!
resources:
    containers:
        - container: mssql
          image: 'mcr.microsoft.com/mssql/server:2017-latest'
          env:
              ACCEPT_EULA: 'Y'
              SA_PASSWORD: $(SA_PASSWORD)
              MSSQL_PID: Developer
          ports:
              - '1433:1433'
          options: '--name mssql'
stages:
    - stage: Unit_Tests
      displayName: Unit Tests
      dependsOn: []
      jobs:
          - job: Linux_Unit_Tests
            displayName: Linux
            pool:
                vmImage: ubuntu-latest
            steps:
                - task: UseDotNet@2
                  displayName: Use .Net Core sdk 5.x
                  inputs:
                      version: 5.x
                - task: DotNetCoreCLI@2
                  displayName: dotnet test
                  inputs:
                      command: test
                      projects: '**/*.Tests.UnitTests.csproj'
          - job: MacOS_Unit_Tests
            displayName: Mac OS
            pool:
                vmImage: macOS-latest
            steps:
                - task: UseDotNet@2
                  displayName: Use .Net Core sdk 5.x
                  inputs:
                      version: 5.x
                - task: DotNetCoreCLI@2
                  displayName: dotnet test
                  inputs:
                      command: test
                      projects: '**/*.Tests.UnitTests.csproj'
          - job: Windows_Unit_Tests
            displayName: Windows
            pool:
                vmImage: windows-latest
            steps:
                - task: UseDotNet@2
                  displayName: Use .Net Core sdk 5.x
                  inputs:
                      version: 5.x
                - task: DotNetCoreCLI@2
                  displayName: dotnet test
                  inputs:
                      command: test
                      projects: '**/*.Tests.UnitTests.csproj'
    - stage: Integration_Tests
      displayName: Integration Tests
      dependsOn: []
      jobs:
          - job: Linux_Integration_Tests
            services:
                mssql: mssql
            timeoutInMinutes: 120
            displayName: Linux
            pool:
                vmImage: ubuntu-latest
            steps:
                - task: UseDotNet@2
                  displayName: Use .Net Core sdk 5.x
                  inputs:
                      version: 5.x
                - task: DotNetCoreCLI@2
                  displayName: dotnet test
                  inputs:
                      command: test
                      projects: '**/Umbraco.Tests.Integration.csproj'
                  env:
                      UmbracoIntegrationTestConnectionString: 'Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD);'
          - job: Windows_Integration_Tests
            timeoutInMinutes: 120
            displayName: Windows
            pool:
                vmImage: windows-latest
            steps:
                - task: UseDotNet@2
                  displayName: Use .Net Core sdk 5.x
                  inputs:
                      version: 5.x
                - powershell: sqllocaldb start mssqllocaldb
                  displayName: Start MSSQL LocalDb
                - task: DotNetCoreCLI@2
                  displayName: dotnet test
                  inputs:
                      command: test
                      projects: '**\Umbraco.Tests.Integration.csproj'
    - stage: Acceptance_Tests
      displayName: Acceptance Tests
      dependsOn: []
      variables:
          - name: Umbraco__CMS__Unattended__InstallUnattended
            value: true
          - name: Umbraco__CMS__Unattended__UnattendedUserName
            value: Cypress Test
          - name: Umbraco__CMS__Unattended__UnattendedUserEmail
            value: <EMAIL>
          - name: Umbraco__CMS__Unattended__UnattendedUserPassword
            value: <PASSWORD>!
          - name: UmbracoDatabaseServer
            value: (LocalDB)\MSSQLLocalDB
          - name: UmbracoDatabaseName
            value: Cypress
          - name: ConnectionStrings__umbracoDbDSN
            value: Server=$(UmbracoDatabaseServer);Database=$(UmbracoDatabaseName);Integrated Security=true;
      jobs:
          - job: Windows_Acceptance_tests
            displayName: Windows
            pool:
                vmImage: windows-latest
            steps:
                - task: UseDotNet@2
                  displayName: Use .Net Core sdk 5.x
                  inputs:
                      version: 5.x

                - powershell: sqllocaldb start mssqllocaldb
                  displayName: Start MSSQL LocalDb
                - powershell:  Invoke-Sqlcmd -Query "CREATE DATABASE $($env:UmbracoDatabaseName)" -ServerInstance $env:UmbracoDatabaseServer
                  displayName: Create database
                - task: DotNetCoreCLI@2
                  displayName: dotnet build (Netcore)
                  inputs:
                      command: build
                      projects: '**/Umbraco.Web.UI.Netcore.csproj'
                - task: NodeTool@0
                  displayName: Use Node 11.x
                  inputs:
                       versionSpec: 11.x
                - task: Npm@1
                  displayName: npm install (Client)
                  inputs:
                    workingDir: src\Umbraco.Web.UI.Client
                    verbose: false
                - task: gulp@0
                  displayName: gulp build
                  inputs:
                    gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js
                    targets: build
                    workingDirectory: src\Umbraco.Web.UI.Client
                #- powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj"
                #  displayName: dotnet run (Netcore)
                - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj
                  displayName: dotnet run (Netcore)
                - task: PowerShell@1
                  displayName: Generate Cypress.env.json
                  inputs:
                      scriptType: inlineScript
                      inlineScript: >
                          @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $<PASSWORD>:<PASSWORD> } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json"<commit_msg>Update azure-pipelines.yml for Azure Pipelines<commit_after>variables:
    buildConfiguration: Release
    SA_PASSWORD: <PASSWORD>!
resources:
    containers:
        - container: mssql
          image: 'mcr.microsoft.com/mssql/server:2017-latest'
          env:
              ACCEPT_EULA: 'Y'
              SA_PASSWORD: $(SA_PASSWORD)
              MSSQL_PID: Developer
          ports:
              - '1433:1433'
          options: '--name mssql'
stages:
    - stage: Unit_Tests
      displayName: Unit Tests
      dependsOn: []
      jobs:
          - job: Linux_Unit_Tests
            displayName: Linux
            pool:
                vmImage: ubuntu-latest
            steps:
                - task: UseDotNet@2
                  displayName: Use .Net Core sdk 5.x
                  inputs:
                      version: 5.x
                - task: DotNetCoreCLI@2
                  displayName: dotnet test
                  inputs:
                      command: test
                      projects: '**/*.Tests.UnitTests.csproj'
          - job: MacOS_Unit_Tests
            displayName: Mac OS
            pool:
                vmImage: macOS-latest
            steps:
                - task: UseDotNet@2
                  displayName: Use .Net Core sdk 5.x
                  inputs:
                      version: 5.x
                - task: DotNetCoreCLI@2
                  displayName: dotnet test
                  inputs:
                      command: test
                      projects: '**/*.Tests.UnitTests.csproj'
          - job: Windows_Unit_Tests
            displayName: Windows
            pool:
                vmImage: windows-latest
            steps:
                - task: UseDotNet@2
                  displayName: Use .Net Core sdk 5.x
                  inputs:
                      version: 5.x
                - task: DotNetCoreCLI@2
                  displayName: dotnet test
                  inputs:
                      command: test
                      projects: '**/*.Tests.UnitTests.csproj'
    - stage: Integration_Tests
      displayName: Integration Tests
      dependsOn: []
      jobs:
          - job: Linux_Integration_Tests
            services:
                mssql: mssql
            timeoutInMinutes: 120
            displayName: Linux
            pool:
                vmImage: ubuntu-latest
            steps:
                - task: UseDotNet@2
                  displayName: Use .Net Core sdk 5.x
                  inputs:
                      version: 5.x
                - task: DotNetCoreCLI@2
                  displayName: dotnet test
                  inputs:
                      command: test
                      projects: '**/Umbraco.Tests.Integration.csproj'
                  env:
                      UmbracoIntegrationTestConnectionString: 'Server=localhost,1433;User Id=sa;Password=$(<PASSWORD>);'
          - job: Windows_Integration_Tests
            timeoutInMinutes: 120
            displayName: Windows
            pool:
                vmImage: windows-latest
            steps:
                - task: UseDotNet@2
                  displayName: Use .Net Core sdk 5.x
                  inputs:
                      version: 5.x
                - powershell: sqllocaldb start mssqllocaldb
                  displayName: Start MSSQL LocalDb
                - task: DotNetCoreCLI@2
                  displayName: dotnet test
                  inputs:
                      command: test
                      projects: '**\Umbraco.Tests.Integration.csproj'
    - stage: Acceptance_Tests
      displayName: Acceptance Tests
      dependsOn: []
      variables:
          - name: Umbraco__CMS__Unattended__InstallUnattended
            value: true
          - name: Umbraco__CMS__Unattended__UnattendedUserName
            value: Cypress Test
          - name: Umbraco__CMS__Unattended__UnattendedUserEmail
            value: <EMAIL>
          - name: Umbraco__CMS__Unattended__UnattendedUserPassword
            value: <PASSWORD>!
          - name: UmbracoDatabaseServer
            value: (LocalDB)\MSSQLLocalDB
          - name: UmbracoDatabaseName
            value: Cypress
          - name: ConnectionStrings__umbracoDbDSN
            value: Server=$(UmbracoDatabaseServer);Database=$(UmbracoDatabaseName);Integrated Security=true;
      jobs:
          - job: Windows_Acceptance_tests
            displayName: Windows
            pool:
                vmImage: windows-latest
            steps:
                - task: UseDotNet@2
                  displayName: Use .Net Core sdk 5.x
                  inputs:
                      version: 5.x

                - powershell: sqllocaldb start mssqllocaldb
                  displayName: Start MSSQL LocalDb
                - powershell:  Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer
                  displayName: Create database
                - task: DotNetCoreCLI@2
                  displayName: dotnet build (Netcore)
                  inputs:
                      command: build
                      projects: '**/Umbraco.Web.UI.Netcore.csproj'
                - task: NodeTool@0
                  displayName: Use Node 11.x
                  inputs:
                       versionSpec: 11.x
                - task: Npm@1
                  displayName: npm install (Client)
                  inputs:
                    workingDir: src\Umbraco.Web.UI.Client
                    verbose: false
                - task: gulp@0
                  displayName: gulp build
                  inputs:
                    gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js
                    targets: build
                    workingDirectory: src\Umbraco.Web.UI.Client
                #- powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "--no-build", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj"
                #  displayName: dotnet run (Netcore)
                - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj
                  displayName: dotnet run (Netcore)
                - task: PowerShell@1
                  displayName: Generate Cypress.env.json
                  inputs:
                      scriptType: inlineScript
                      inlineScript: >
                          @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:<PASSWORD> } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json"
{'fraction_non_alphanumeric': 0.07124352331606218, 'fraction_numerical': 0.008229198415117342, 'mean_word_length': 1.2099680080821686, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1971260', 'n_tokens_mistral': 3622, 'n_tokens_neox': 3272, 'n_words': 727}