From 92ccb4869cfbc98c3905b9ff6eac1da3b4211e57 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 10:19:19 -0400 Subject: [PATCH 01/21] :rocket: Fix issues with GHA config --- .github/workflows/github.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index 43bb7df4..faa5843a 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -235,7 +235,7 @@ jobs: publish: needs: test - if: ${{ success() && startsWith( 'refs/tags/', env.GITHUB_REF ) }} + if: ${{ success() && startsWith( 'refs/tags/', $GITHUB_REF ) }} runs-on: ubuntu-latest From e70777b31d2f99a07faf98a81ef7debe7bd5f37b Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 10:24:08 -0400 Subject: [PATCH 02/21] :rocket: Fix syntax.. I think --- .github/workflows/github.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index faa5843a..63339397 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -213,7 +213,7 @@ jobs: run: ./Build/Invoke-ModuleTests.ps1 - name: Publish Test Results - if: ${{ always() }} + if: always() uses: MirageNet/nunit-reporter@v1.0.5 with: access-token: ${{ secrets.GITHUB_TOKEN }} @@ -235,7 +235,7 @@ jobs: publish: needs: test - if: ${{ success() && startsWith( 'refs/tags/', $GITHUB_REF ) }} + if: success() && startsWith( github.ref, 'refs/tags/' ) runs-on: ubuntu-latest From 1683f08fc3fc785af8f05290351855e8d2b98cf1 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 10:29:04 -0400 Subject: [PATCH 03/21] :rocket: Update syntax to fix things --- .github/workflows/github.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index 63339397..e4e53320 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -21,7 +21,7 @@ env: NupkgArtifactName: 'PSKoans.nupkg' ModuleArtifactName: 'PSKoans' PesterInfoFileName: 'PesterVersion.txt' - PesterInfoFilePath: '$GITHUB_WORKSPACE/PesterVersion.txt' + PesterInfoFilePath: '${{ env.GITHUB_WORKSPACE }}/PesterVersion.txt' jobs: @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest env: - FilePath: '$GITHUB_WORKSPACE/Changelog.md' + FilePath: '${{ env.GITHUB_WORKSPACE }}/Changelog.md' steps: - uses: actions/checkout@v2 From c5b02668fb4c7115aacd9ee1570dee8d3e201a3b Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 10:33:40 -0400 Subject: [PATCH 04/21] :rocket: Adjust expression syntax --- .github/workflows/github.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index e4e53320..c9733abd 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -21,7 +21,7 @@ env: NupkgArtifactName: 'PSKoans.nupkg' ModuleArtifactName: 'PSKoans' PesterInfoFileName: 'PesterVersion.txt' - PesterInfoFilePath: '${{ env.GITHUB_WORKSPACE }}/PesterVersion.txt' + PesterInfoFilePath: '${{ github.workspace }}/PesterVersion.txt' jobs: @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest env: - FilePath: '${{ env.GITHUB_WORKSPACE }}/Changelog.md' + FilePath: '${{ github.workspace }}/Changelog.md' steps: - uses: actions/checkout@v2 @@ -53,8 +53,8 @@ jobs: runs-on: ubuntu-latest env: - FileSystemDeploymentPath: '$GITHUB_WORKSPACE/Deploy/FileSystem' - BuiltModulePath: '$GITHUB_WORKSPACE/Deploy/PSKoans' + FileSystemDeploymentPath: '${{ github.workspace }}/Deploy/FileSystem' + BuiltModulePath: '${{ github.workspace }}/Deploy/PSKoans' # This needs to be set by the script which creates the nupkg NupkgPath: '' @@ -136,7 +136,7 @@ jobs: runs-on: ${{ matrix.os }} env: - PackageDownloadPath: '$GITHUB_WORKSPACE/Module' + PackageDownloadPath: '${{ github.workspace }}/Module' PSRepositoryName: 'FileSystem' # The following variables MUST be set in Invoke-ModuleTests.ps1 TestFile: '' @@ -217,13 +217,13 @@ jobs: uses: MirageNet/nunit-reporter@v1.0.5 with: access-token: ${{ secrets.GITHUB_TOKEN }} - path: '$GITHUB_WORKSPACE\$TestResults' + path: '${{ github.workspace }}/$TestResults' - name: Generate Code Coverage uses: danielpalme/ReportGenerator-GitHub-Action@4.8.8 with: - reports: '$GITHUB_WORKSPACE\$CodeCoverageFile' - targetdir: '$GITHUB_WORKSPACE\coveragereports' + reports: '${{ github.workspace }}/$CodeCoverageFile' + targetdir: '${{ github.workspace }}/coveragereports' sourcedirs: $SourceFolders title: PSKoans Code Coverage @@ -231,7 +231,7 @@ jobs: uses: actions/upload-artifact@v2.2.3 with: name: 'Code Coverage Reports' - path: '$GITHUB_WORKSPACE\coveragereports' + path: '${{ github.workspace }}/coveragereports' publish: needs: test @@ -240,8 +240,8 @@ jobs: runs-on: ubuntu-latest env: - BuiltModulePath: '$GITHUB_WORKSPACE/Deploy/PSKoans' - GalleryDeploymentPath: '$GITHUB_WORKSPACE/Deploy/PSGallery' + BuiltModulePath: '${{ github.workspace }}/Deploy/PSKoans' + GalleryDeploymentPath: '${{ github.workspace }}/Deploy/PSGallery' # This variable must be set by the script TagName: '' @@ -261,17 +261,17 @@ jobs: - name: Set Release Tag Name shell: pwsh run: | - $tagName = ("${{ env.GITHUB_REF }}" -replace '^refs/tags/').Trim() - "TagName=$tagname" | Add-Content -Path '${{ env.GITHUB_ENV }}' + $tagName = ("${{ github.ref }}" -replace '^refs/tags/').Trim() + "TagName=$tagname" | Add-Content -Path '${{ github.env }}' - name: Download Artifacts uses: actions/download-artifact@v2.0.9 with: - path: '$GITHUB_WORKSPACE/artifacts' + path: '${{ github.workspace }}/artifacts' - name: Update Release with Artifacts & Changelog uses: Roang-zero1/github-create-release-action@v2.1.0 with: created_tag: $TagName - changelog_file: '$GITHUB_WORKSPACE/artifacts/Changelog.md' + changelog_file: '${{ github.workspace }}/artifacts/Changelog.md' release_title: 'PSKoans Release $TagName' From 634a148b3dfbea9d2e88b6878b79a064849d8a27 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 10:38:17 -0400 Subject: [PATCH 05/21] :rocket: add publish step name --- .github/workflows/github.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index c9733abd..03229c9f 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -234,6 +234,7 @@ jobs: path: '${{ github.workspace }}/coveragereports' publish: + name: Publish Module to PSGallery needs: test if: success() && startsWith( github.ref, 'refs/tags/' ) From b07f621a8e6e38d610807edf08c0ed826cdb59a5 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 10:40:09 -0400 Subject: [PATCH 06/21] :rocket: Update Build-Module to support GHA --- Build/Build-Module.ps1 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Build/Build-Module.ps1 b/Build/Build-Module.ps1 index 1ee5a3b8..b218ca8a 100644 --- a/Build/Build-Module.ps1 +++ b/Build/Build-Module.ps1 @@ -4,7 +4,15 @@ Get-PackageProvider -Name NuGet -ForceBootstrap > $null # Create format.ps1xml file & "$PSScriptRoot/../PSKoans.ezformat.ps1" -Import-Module "$env:PROJECTROOT/PSKoans" +if ($env:PROJECTROOT) { + Import-Module "$env:PROJECTROOT/PSKoans" +} +elseif ($env:GITHUB_WORKSPACE) { + Import-Module "$env:GITHUB_WORKSPACE/PSKoans" +} +else { + Import-Module "./PSKoans" +} Set-BuildEnvironment From bc776b315cee015e16d05df17af15cf365426737 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 11:58:15 -0400 Subject: [PATCH 07/21] :rocket: update env var casing --- Build/Build-Module.ps1 | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Build/Build-Module.ps1 b/Build/Build-Module.ps1 index b218ca8a..b2d34a4d 100644 --- a/Build/Build-Module.ps1 +++ b/Build/Build-Module.ps1 @@ -4,15 +4,7 @@ Get-PackageProvider -Name NuGet -ForceBootstrap > $null # Create format.ps1xml file & "$PSScriptRoot/../PSKoans.ezformat.ps1" -if ($env:PROJECTROOT) { - Import-Module "$env:PROJECTROOT/PSKoans" -} -elseif ($env:GITHUB_WORKSPACE) { - Import-Module "$env:GITHUB_WORKSPACE/PSKoans" -} -else { - Import-Module "./PSKoans" -} +Import-Module "$env:ProjectRoot/PSKoans" Set-BuildEnvironment @@ -42,7 +34,7 @@ catch { } # Build external help files from Platyps MD files -New-ExternalHelp -Path "$env:PROJECTROOT/docs/" -OutputPath "$env:PROJECTROOT/PSKoans/en" +New-ExternalHelp -Path "$env:ProjectRoot/docs/" -OutputPath "$env:ProjectRoot/PSKoans/en" -Copy-Item -Path "$env:PROJECTROOT/PSKoans" -Destination $env:BUILTMODULEPATH -Recurse -PassThru | +Copy-Item -Path "$env:ProjectRoot/PSKoans" -Destination $env:BUILTMODULEPATH -Recurse -PassThru | Where-Object { -not $_.PSIsContainer } From 99e92b00ae38792d59ecada964603e103ab1d1bb Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 12:04:52 -0400 Subject: [PATCH 08/21] :rocket: Adjust initialize-environment.ps1 for gha --- Build/Initialize-Environment.ps1 | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Build/Initialize-Environment.ps1 b/Build/Initialize-Environment.ps1 index 9576a58d..361d1e28 100644 --- a/Build/Initialize-Environment.ps1 +++ b/Build/Initialize-Environment.ps1 @@ -3,12 +3,27 @@ Get-PackageProvider -Name NuGet -ForceBootstrap > $null Set-BuildEnvironment $ProjectRoot = Resolve-Path -Path "$PSScriptRoot/.." -Write-Host "##vso[task.setvariable variable=ProjectRoot]$ProjectRoot" $Lines = '-' * 70 Write-Host $Lines -Write-Host "Repository Branch: $env:BUILD_SOURCEBRANCHNAME ($env:BUILD_SOURCEBRANCH)" + +$AzurePipelines = $env:BUILD_SOURCESDIRECTORY -and $env:BUILD_BUILDNUMBER +$GithubActions = [bool]$env:GITHUB_WORKSPACE + +if ($AzurePipelines) { + Write-Host "Repository Branch: [$env:BUILD_SOURCEBRANCHNAME] ($env:BUILD_SOURCEBRANCH)" + Write-Host "##vso[task.setvariable variable=ProjectRoot]$ProjectRoot" +} +elseif ($GithubActions) { + Write-Host "Repository Branch: $env:GITHUB_REF" + if ($env:GITHUB_HEAD_REF -and $env:GITHUB_BASE_REF) { + Write-Host "Pull Request Build: [$env:GITHUB_HEAD_REF] (HEAD) -> [$env:GITHUB_BASE_REF] (BASE)" + } + + "PROJECTROOT=$ProjectRoot" | Add-Content -Path $env:GITHUB_ENV +} + Write-Host "Build System Details:" Get-Item 'Env:BH*' | Out-String | Write-Host Write-Host $Lines From a14a5d13554810de0f62107564ddfa49e67c05ca Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 12:05:45 -0400 Subject: [PATCH 09/21] :rocket: update env init --- Build/Initialize-Environment.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Build/Initialize-Environment.ps1 b/Build/Initialize-Environment.ps1 index 361d1e28..18b205ab 100644 --- a/Build/Initialize-Environment.ps1 +++ b/Build/Initialize-Environment.ps1 @@ -23,6 +23,9 @@ elseif ($GithubActions) { "PROJECTROOT=$ProjectRoot" | Add-Content -Path $env:GITHUB_ENV } +else { + $env:PROJECTROOT = $ProjectRoot +} Write-Host "Build System Details:" Get-Item 'Env:BH*' | Out-String | Write-Host From a286827a0cc11a9edd149c3fb39645278a341c15 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 12:08:40 -0400 Subject: [PATCH 10/21] :rocket: fix env var ref in build --- Build/Build-Module.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Build/Build-Module.ps1 b/Build/Build-Module.ps1 index b2d34a4d..1ee5a3b8 100644 --- a/Build/Build-Module.ps1 +++ b/Build/Build-Module.ps1 @@ -4,7 +4,7 @@ Get-PackageProvider -Name NuGet -ForceBootstrap > $null # Create format.ps1xml file & "$PSScriptRoot/../PSKoans.ezformat.ps1" -Import-Module "$env:ProjectRoot/PSKoans" +Import-Module "$env:PROJECTROOT/PSKoans" Set-BuildEnvironment @@ -34,7 +34,7 @@ catch { } # Build external help files from Platyps MD files -New-ExternalHelp -Path "$env:ProjectRoot/docs/" -OutputPath "$env:ProjectRoot/PSKoans/en" +New-ExternalHelp -Path "$env:PROJECTROOT/docs/" -OutputPath "$env:PROJECTROOT/PSKoans/en" -Copy-Item -Path "$env:ProjectRoot/PSKoans" -Destination $env:BUILTMODULEPATH -Recurse -PassThru | +Copy-Item -Path "$env:PROJECTROOT/PSKoans" -Destination $env:BUILTMODULEPATH -Recurse -PassThru | Where-Object { -not $_.PSIsContainer } From 9b9c55980c98234bd9b52d60af54c2847d6c7ace Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 12:21:47 -0400 Subject: [PATCH 11/21] :rocket: fix env var usage casing issue suuuuuck --- Build/Build-Module.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Build/Build-Module.ps1 b/Build/Build-Module.ps1 index 1ee5a3b8..6820cbb2 100644 --- a/Build/Build-Module.ps1 +++ b/Build/Build-Module.ps1 @@ -36,5 +36,7 @@ catch { # Build external help files from Platyps MD files New-ExternalHelp -Path "$env:PROJECTROOT/docs/" -OutputPath "$env:PROJECTROOT/PSKoans/en" -Copy-Item -Path "$env:PROJECTROOT/PSKoans" -Destination $env:BUILTMODULEPATH -Recurse -PassThru | +$buildModulePath = @($env:BuiltModulePath, $env:BUILTMODULEPATH).Where({ $_ }, 'First') + +Copy-Item -Path "$env:PROJECTROOT/PSKoans" -Destination $buildModulePath -Recurse -PassThru | Where-Object { -not $_.PSIsContainer } From 623220bad409361bcae17c04e2b6e826669cf9f7 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 12:29:25 -0400 Subject: [PATCH 12/21] :rocket: sigh --- Build/Build-Module.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build/Build-Module.ps1 b/Build/Build-Module.ps1 index 6820cbb2..e267506c 100644 --- a/Build/Build-Module.ps1 +++ b/Build/Build-Module.ps1 @@ -36,7 +36,7 @@ catch { # Build external help files from Platyps MD files New-ExternalHelp -Path "$env:PROJECTROOT/docs/" -OutputPath "$env:PROJECTROOT/PSKoans/en" -$buildModulePath = @($env:BuiltModulePath, $env:BUILTMODULEPATH).Where({ $_ }, 'First') +$buildModulePath = @($env:BuiltModulePath, $env:BUILTMODULEPATH).Where({ $_ }, 'First')[0] Copy-Item -Path "$env:PROJECTROOT/PSKoans" -Destination $buildModulePath -Recurse -PassThru | Where-Object { -not $_.PSIsContainer } From 6ee6cbd474d009ee76f31d8acc3966b6390b2dd5 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 12:36:36 -0400 Subject: [PATCH 13/21] :rocket: fix variable refs grumbling about misleading documentation --- .github/workflows/github.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index 03229c9f..629613a4 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -46,7 +46,7 @@ jobs: uses: actions/upload-artifact@v2.2.3 with: name: Changelog.md - path: $FilePath + path: ${{ env.FilePath }} build: name: 'Build Module' @@ -101,14 +101,14 @@ jobs: - name: Upload Module Artifact uses: actions/upload-artifact@v2.2.3 with: - name: $ModuleArtifactName - path: $BuiltModulePath + name: ${{ env.ModuleArtifactName }} + path: ${{ env.BuiltModulePath }} - name: Upload Pester Version Artifact uses: actions/upload-artifact@v2.2.3 with: - name: $PesterInfoFileName - path: $PesterInfoFilePath + name: ${{ env.PesterInfoFileName }} + path: ${{ env.PesterInfoFilePath }} - name: Generate Nupkg shell: pwsh @@ -119,8 +119,8 @@ jobs: - name: Upload Nupkg Artifact uses: actions/upload-artifact@v2.2.3 with: - name: $NupkgArtifactName - path: $NupkgPath + name: ${{ env.NupkgArtifactName }} + path: ${{ env.NupkgPath }} test: name: "Test Module" @@ -184,14 +184,14 @@ jobs: - name: Download Module Nupkg uses: actions/download-artifact@v2.0.9 with: - name: $NupkgArtifactName - path: $PackageDownloadPath + name: ${{ env.NupkgArtifactName }} + path: ${{ env.PackageDownloadPath }} - name: Download Pester Version Information uses: actions/download-artifact@v2.0.9 with: - name: $PesterInfoFileName - path: $PesterInfoFilePath + name: ${{ env.PesterInfoFileName }} + path: ${{ env.PesterInfoFilePath }} - name: Install Module from Nupkg shell: pwsh @@ -224,7 +224,7 @@ jobs: with: reports: '${{ github.workspace }}/$CodeCoverageFile' targetdir: '${{ github.workspace }}/coveragereports' - sourcedirs: $SourceFolders + sourcedirs: ${{ env.ModuleFolders }} title: PSKoans Code Coverage - name: Publish Code Coverage artifacts @@ -273,6 +273,6 @@ jobs: - name: Update Release with Artifacts & Changelog uses: Roang-zero1/github-create-release-action@v2.1.0 with: - created_tag: $TagName + created_tag: ${{ env.TagName }} changelog_file: '${{ github.workspace }}/artifacts/Changelog.md' - release_title: 'PSKoans Release $TagName' + release_title: 'PSKoans Release ${{ env.TagName }}' From aaccca1b6cd4ed89904a823c965458fe2f43752e Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 12:39:14 -0400 Subject: [PATCH 14/21] :rocket: fix publish with multiple pester versions when more than one pester version is available, publishing fails because powershellget is awful --- Deploy/Publish.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Deploy/Publish.ps1 b/Deploy/Publish.ps1 index 62c5a944..ec2adb36 100644 --- a/Deploy/Publish.ps1 +++ b/Deploy/Publish.ps1 @@ -16,12 +16,12 @@ if ($OutputDirectory) { Import-Module "$PSScriptRoot/PSKoans" $Module = Get-Module -Name PSKoans $Dependencies = @( - $Module.RequiredModules.Name - $Module.NestedModules.Name + $Module.RequiredModules | Select-Object -Property Name, Version + $Module.NestedModules | Select-Object -Property Name, Version ).Where{ $_ } foreach ($Module in $Dependencies) { - Publish-Module -Name $Module -Repository FileSystem -NugetApiKey "Test-Publish" + Publish-Module -Name $Module.Name -Repository FileSystem -NugetApiKey "Test-Publish" -RequiredVersion $Module.Version } } From b09e470367a45fdb72ea042110715ceb05c638f7 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 12:45:44 -0400 Subject: [PATCH 15/21] :rocket: fix artifact handling for Pester version --- .github/workflows/github.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index 629613a4..21ea2c9c 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -20,7 +20,7 @@ on: env: NupkgArtifactName: 'PSKoans.nupkg' ModuleArtifactName: 'PSKoans' - PesterInfoFileName: 'PesterVersion.txt' + PesterInfoFileName: 'PesterVersion' PesterInfoFilePath: '${{ github.workspace }}/PesterVersion.txt' jobs: @@ -191,7 +191,7 @@ jobs: uses: actions/download-artifact@v2.0.9 with: name: ${{ env.PesterInfoFileName }} - path: ${{ env.PesterInfoFilePath }} + path: ${{ github.workspace }} - name: Install Module from Nupkg shell: pwsh From 87404b813c3d41bccb323df9de19b4041d19164e Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 12:53:41 -0400 Subject: [PATCH 16/21] :rocket: Force CI to use the declared version dep --- .github/workflows/github.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index 21ea2c9c..d8244db2 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -76,14 +76,14 @@ jobs: $Params.Name = 'Pester' $Params.SkipPublisherCheck = $true - $Params.MinimumVersion = $Params.MinimumVersion = (Get-Module -ListAvailable ./PSKoans).RequiredModules.Where{$_.Name -eq 'Pester'}.Version + $Params.RequiredVersion = $Params.MinimumVersion = (Get-Module -ListAvailable ./PSKoans).RequiredModules.Where{$_.Name -eq 'Pester'}.Version $Params | Out-String | Write-Host Install-Module @Params - $Params.MinimumVersion | Set-Content -Path "${{ env.PesterInfoFilePath }}" + $Params.RequiredVersion | Set-Content -Path "${{ env.PesterInfoFilePath }}" $Params.Remove('SkipPublisherCheck') - $Params.Remove('MinimumVersion') + $Params.Remove('RequiredVersion') $Params.Name = 'EZOut' $Params.AllowClobber = $true @@ -161,12 +161,12 @@ jobs: $Params.Name = 'Pester' $Params.SkipPublisherCheck = $true - $Params.MinimumVersion = $Params.MinimumVersion = (Get-Module -ListAvailable ./PSKoans).RequiredModules.Where{$_.Name -eq 'Pester'}.Version + $Params.RequiredVersion = $Params.MinimumVersion = (Get-Module -ListAvailable ./PSKoans).RequiredModules.Where{$_.Name -eq 'Pester'}.Version $Params | Out-String | Write-Host Install-Module @Params $Params.Remove('SkipPublisherCheck') - $Params.Remove('MinimumVersion') + $Params.Remove('RequiredVersion') $Params.Name = 'EZOut' $Params.AllowClobber = $true From af5db2a0bbdc960b124c088f648966a24e8bc4ac Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 12:58:49 -0400 Subject: [PATCH 17/21] :rocket: force ci tests to use exact pester ver --- .github/workflows/github.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index d8244db2..999225a3 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -198,7 +198,7 @@ jobs: run: | $pesterParams = @{ Name = 'Pester' - MinimumVersion = Get-Content -Path "${{ env.PesterInfoFilePath }}" + RequiredVersion = Get-Content -Path "${{ env.PesterInfoFilePath }}" ProviderName = 'NuGet' Path = '${{ env.PackageDownloadPath }}' Force = $true From 9a041c68d81ab501400c3fb88963f307e6d4f89c Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 13:05:19 -0400 Subject: [PATCH 18/21] :rocket: Force pskoans to use pester 5.0.2 testing a theeery --- PSKoans/PSKoans.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSKoans/PSKoans.psd1 b/PSKoans/PSKoans.psd1 index df3e9e77..b3f917d1 100644 --- a/PSKoans/PSKoans.psd1 +++ b/PSKoans/PSKoans.psd1 @@ -54,7 +54,7 @@ RequiredModules = @( @{ ModuleName = 'Pester' - ModuleVersion = '5.0.2' + RequiredVersion = '5.0.2' } ) From 1d73ab2e8da3598bbdf5afd0638fc7f1bc450295 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 13:34:23 -0400 Subject: [PATCH 19/21] :rocket: fix version detection --- .github/workflows/github.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index 999225a3..014f8b52 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -76,7 +76,7 @@ jobs: $Params.Name = 'Pester' $Params.SkipPublisherCheck = $true - $Params.RequiredVersion = $Params.MinimumVersion = (Get-Module -ListAvailable ./PSKoans).RequiredModules.Where{$_.Name -eq 'Pester'}.Version + $Params.RequiredVersion = $Params.MinimumVersion = (Get-Module -ListAvailable ./PSKoans).RequiredModules.Where{$_.Name -eq 'Pester'}.ModuleVersion $Params | Out-String | Write-Host Install-Module @Params @@ -161,7 +161,7 @@ jobs: $Params.Name = 'Pester' $Params.SkipPublisherCheck = $true - $Params.RequiredVersion = $Params.MinimumVersion = (Get-Module -ListAvailable ./PSKoans).RequiredModules.Where{$_.Name -eq 'Pester'}.Version + $Params.RequiredVersion = $Params.MinimumVersion = (Get-Module -ListAvailable ./PSKoans).RequiredModules.Where{$_.Name -eq 'Pester'}.ModuleVersion $Params | Out-String | Write-Host Install-Module @Params From ff1a7f17a3e70955b649693f7b718279e441f639 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 13:34:53 -0400 Subject: [PATCH 20/21] :rocket: fix dep version --- PSKoans/PSKoans.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSKoans/PSKoans.psd1 b/PSKoans/PSKoans.psd1 index b3f917d1..df3e9e77 100644 --- a/PSKoans/PSKoans.psd1 +++ b/PSKoans/PSKoans.psd1 @@ -54,7 +54,7 @@ RequiredModules = @( @{ ModuleName = 'Pester' - RequiredVersion = '5.0.2' + ModuleVersion = '5.0.2' } ) From c2b9db150b755e2b49d5f8a62b7098e0209f9a65 Mon Sep 17 00:00:00 2001 From: "Joel Sallow (/u/ta11ow)" <32407840+vexx32@users.noreply.github.com> Date: Wed, 19 May 2021 14:00:46 -0400 Subject: [PATCH 21/21] :rocket: fix pester version check --- .github/workflows/github.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github.yml b/.github/workflows/github.yml index 014f8b52..999225a3 100644 --- a/.github/workflows/github.yml +++ b/.github/workflows/github.yml @@ -76,7 +76,7 @@ jobs: $Params.Name = 'Pester' $Params.SkipPublisherCheck = $true - $Params.RequiredVersion = $Params.MinimumVersion = (Get-Module -ListAvailable ./PSKoans).RequiredModules.Where{$_.Name -eq 'Pester'}.ModuleVersion + $Params.RequiredVersion = $Params.MinimumVersion = (Get-Module -ListAvailable ./PSKoans).RequiredModules.Where{$_.Name -eq 'Pester'}.Version $Params | Out-String | Write-Host Install-Module @Params @@ -161,7 +161,7 @@ jobs: $Params.Name = 'Pester' $Params.SkipPublisherCheck = $true - $Params.RequiredVersion = $Params.MinimumVersion = (Get-Module -ListAvailable ./PSKoans).RequiredModules.Where{$_.Name -eq 'Pester'}.ModuleVersion + $Params.RequiredVersion = $Params.MinimumVersion = (Get-Module -ListAvailable ./PSKoans).RequiredModules.Where{$_.Name -eq 'Pester'}.Version $Params | Out-String | Write-Host Install-Module @Params