<commit_before>os: unstable
install:
  - cmd: "cinst pester"
  - ps: Invoke-webrequest -UseBasicParsing -Uri 'https://download.microsoft.com/download/C/4/1/C41378D4-7F41-4BBE-9D0D-0E4F98585C61/PackageManagement_x64.msi' -outfile 'PackageManagement_x64.msi'
  - ps: Start-Process -FilePath msiexec -ArgumentList /i, PackageManagement_x64.msi, /quiet -Wait;remove-item "PackageManagement_x64.msi"
  - ps: $env:logonaccountusername

environment:
  logonaccountuserpassword:
    secure: 53BYDzQQoZumsxd256drnw==
  logonaccountusername:
    secure: <KEY>
  subscriptionid:
    secure: <KEY>
  tenantid:
    secure: <KEY>
  PSGKey:
    secure: <KEY>

build: false

test_script:
  - ps: $res = Invoke-Pester -ExcludeTag "Interactive" -Path . -OutputFormat NUnitXml -OutputFile TestsResults.xml -PassThru
  - ps: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestsResults.xml))
  - ps: if ($res.FailedCount -gt 0) { throw "$($res.FailedCount) tests failed."}
on_success:
    - ps: |
        $CurrDir = (Resolve-Path .).Path
        $ModuleFolder = $env:PSModulePath.split(";")[0]
        new-item -Path (Join-Path $modulefolder "Blue") -Force -ErrorAction Stop -ItemType Directory
        $manifestcontent = Get-Content "blue.psd1"
        $manifestcontent = $manifestcontent.replace('0.0.1',$Env:APPVEYOR_BUILD_VERSION)
        $manifestcontent | set-content blue.psd1      
        copy-item (ls $CurrDir) -Destination (Join-Path $modulefolder "Blue") -Recurse -Force -ErrorAction Stop
        import-module (Join-Path $modulefolder "Blue\blue.psd1") -Force -ErrorAction Stop
        import-module "C:\Program Files\WindowsPowerShell\Modules\PackageManagement\PackageManagement.psd1" -ErrorAction Stop
        if(Get-Command -Name Get-PackageProvider -ErrorAction SilentlyContinue)
        {
            Get-PackageProvider -Name NuGet -ForceBootstrap
            Publish-Module -Name Blue -NuGetApiKey $Env:PSGKey
            Write-verbose "Published version $($Env:APPVEYOR_BUILD_VERSION)"
        }
        else
        {
            'PSGallery not supported'
        }<commit_msg>Troubleshooting CI AGAIN<commit_after>os: unstable
install:
  - cmd: "cinst pester"
  - ps: Invoke-webrequest -UseBasicParsing -Uri 'https://download.microsoft.com/download/C/4/1/C41378D4-7F41-4BBE-9D0D-0E4F98585C61/PackageManagement_x64.msi' -outfile 'PackageManagement_x64.msi'
  - ps: Start-Process -FilePath msiexec -ArgumentList /i, PackageManagement_x64.msi, /quiet -Wait;remove-item "PackageManagement_x64.msi"
  - ps: $env:logonaccountusername

environment:
  logonaccountuserpassword:
    secure: 53BYDzQQoZumsxd256drnw==
  logonaccountusername:
    secure: 9fhG/BOeoe18Oeeq/wFaY8OjJEujFumo8eqwzxfOBgUPcP5xXeXBNWgD5y/zkMd/
  subscriptionid:
    secure: G<KEY>
  tenantid:
    secure: <KEY>
  PSGKey:
    secure: <KEY>

build: false

test_script:
  - ps: $res = Invoke-Pester -ExcludeTag "Interactive" -Path . -OutputFormat NUnitXml -OutputFile TestsResults.xml -PassThru
  - ps: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestsResults.xml))
  - ps: if ($res.FailedCount -gt 0) { throw "$($res.FailedCount) tests failed."}
on_success:
    - ps: |
        $CurrDir = (Resolve-Path .).Path
        $ModuleFolder = $env:PSModulePath.split(";")[0]
        new-item -Path (Join-Path $modulefolder "Blue") -Force -ErrorAction Stop -ItemType Directory
        $manifestcontent = Get-Content "blue.psd1"
        $manifestcontent = $manifestcontent.replace('0.0.1',$Env:APPVEYOR_BUILD_VERSION)
        $manifestcontent | set-content blue.psd1      
        copy-item (ls $CurrDir) -Destination (Join-Path $modulefolder "Blue") -Recurse -Force -ErrorAction Stop
        import-module (Join-Path $modulefolder "Blue\blue.psd1") -Force -ErrorAction Stop
        import-module "C:\Program Files\WindowsPowerShell\Modules\PackageManagement\PackageManagement.psd1" -ErrorAction Stop
        if(Get-Command -Name Get-PackageProvider -ErrorAction SilentlyContinue)
        {
            Get-PackageProvider -Name NuGet -ForceBootstrap
            Publish-Module -Name Blue -NuGetApiKey $Env:PSGKey
            Write-verbose "Published version $($Env:APPVEYOR_BUILD_VERSION)"
        }
        else
        {
            'PSGallery not supported'
        }
on_finish:
    - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
{'fraction_non_alphanumeric': 0.12330564057717534, 'fraction_numerical': 0.021425448185395716, 'mean_word_length': 3.446064139941691, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5341710', 'n_tokens_mistral': 1609, 'n_tokens_neox': 1557, 'n_words': 287}