diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9cec869..4006f49d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,9 +15,9 @@ jobs: name: Prerequisites runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Powershell Modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1') }} @@ -30,10 +30,10 @@ jobs: runs-on: windows-latest needs: prerequisites steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Powershell Modules id: cache-powershell-modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1') }} @@ -46,7 +46,7 @@ jobs: run: build\vsts-validate.ps1 -TestGeneral $true -TestFunctions $false -Exclude "PSScriptAnalyzer.Tests.ps1" - name: Publish Test Results **/TEST-*.xml if: always() - uses: EnricoMi/publish-unit-test-result-action/composite@v2 + uses: EnricoMi/publish-unit-test-result-action/windows@v2 with: files: '**/TEST-*.xml' check_name: 'General Unit Tests Results' @@ -57,10 +57,10 @@ jobs: runs-on: windows-latest needs: prerequisites steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Powershell Modules id: cache-powershell-modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1') }} @@ -73,7 +73,7 @@ jobs: run: build\vsts-validate-psscriptanalyzer.ps1 -TestPublic $true -TestInternal $false - name: Publish Test Results **/TEST-*.xml if: always() - uses: EnricoMi/publish-unit-test-result-action/composite@v2 + uses: EnricoMi/publish-unit-test-result-action/windows@v2 with: files: '**/TEST-*.xml' check_name: 'Public Functions Unit Tests Results' @@ -84,10 +84,10 @@ jobs: runs-on: windows-latest needs: Prerequisites steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Powershell Modules id: cache-powershell-modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1') }} @@ -100,7 +100,7 @@ jobs: run: build\vsts-validate-psscriptanalyzer.ps1 -TestPublic $false -TestInternal $true - name: Publish Test Results **/TEST-*.xml if: always() - uses: EnricoMi/publish-unit-test-result-action/composite@v2 + uses: EnricoMi/publish-unit-test-result-action/windows@v2 with: files: '**/TEST-*.xml' check_name: 'Internal Functions Unit Tests Results' @@ -111,10 +111,10 @@ jobs: runs-on: windows-latest needs: prerequisites steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Powershell Modules id: cache-powershell-modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1') }} @@ -127,7 +127,7 @@ jobs: run: build\vsts-validate.ps1 -TestGeneral $false -TestFunctions $true - name: Publish Test Results **/TEST-*.xml if: always() - uses: EnricoMi/publish-unit-test-result-action/composite@v2 + uses: EnricoMi/publish-unit-test-result-action/windows@v2 with: files: '**/TEST-*.xml' check_name: 'Individual Unit Tests Results' diff --git a/.github/workflows/update-generated-text.yml b/.github/workflows/update-generated-text.yml index 860eff96..9cdfab18 100644 --- a/.github/workflows/update-generated-text.yml +++ b/.github/workflows/update-generated-text.yml @@ -12,13 +12,13 @@ jobs: name: Generate text runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Cache Powershell Modules id: cache-powershell-modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: C:\Users\runneradmin\Documents\WindowsPowerShell\Modules - key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1, **/buildtools.ps1') }} + key: 20210527|${{ hashFiles('**/vsts-prerequisites.ps1', '**/buildtools.ps1') }} - name: Prerequisites if: steps.cache-powershell-modules.outputs.cache-hit != 'true' shell: powershell @@ -40,11 +40,12 @@ jobs: shell: powershell run: build\generate-findcommandindex.ps1 - name: Create a pull request for changes - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v7 with: commit-message: | 🤖 Fix best practice deviations This pull request was automatically created by the d365fo.tools-Generate-Text action' title: '🤖 Fix best practice deviations' - body: 'This pull request was automatically created by the d365fo.tools-Generate-Text action. See [Building tools](https://github.com/d365collaborative/d365fo.tools/wiki/Building-tools) for more information.' \ No newline at end of file + body: 'This pull request was automatically created by the d365fo.tools-Generate-Text action. See [Building tools](https://github.com/d365collaborative/d365fo.tools/wiki/Building-tools) for more information.' + branch: 'update-generated-text/pull-request-patch-for-branch-${{ github.ref_name }}' \ No newline at end of file diff --git a/.github/workflows/update-wiki.yml b/.github/workflows/update-wiki.yml index 5acf3296..084b1c13 100644 --- a/.github/workflows/update-wiki.yml +++ b/.github/workflows/update-wiki.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Publish wiki folder to repository wiki uses: FH-Inway/github-wiki-publish-action@rsync diff --git a/build/buildtools.ps1 b/build/buildtools.ps1 index 5d607234..1d1c8f44 100644 --- a/build/buildtools.ps1 +++ b/build/buildtools.ps1 @@ -14,6 +14,7 @@ foreach ($item in $modules) { Write-Host "Installing $item" -ForegroundColor Cyan Install-Module -Name $item -Force -Confirm:$false -Scope CurrentUser -AllowClobber -SkipPublisherCheck } - + Import-Module $item -Force + Get-Module -Name $item } \ No newline at end of file diff --git a/build/vsts-prerequisites.ps1 b/build/vsts-prerequisites.ps1 index 68dda50d..4e822b9f 100644 --- a/build/vsts-prerequisites.ps1 +++ b/build/vsts-prerequisites.ps1 @@ -4,6 +4,7 @@ Write-Host "The user running is: $($env:UserName)" # $modules = @("PSFramework", "Az.Storage", "AzureAd", "PSNotification", "PSOAuthHelper", "PowerShellGet", "PackageManagement","ImportExcel","PSScriptAnalyzer") $modules = @("PSFramework", "PSScriptAnalyzer", "Az.Storage", "AzureAd", "PSNotification", "PSOAuthHelper", "ImportExcel") +Write-Host "Installing Pester, maximum version 4.99.99" -ForegroundColor Cyan Install-Module "Pester" -MaximumVersion 4.99.99 -Force -Confirm:$false -Scope CurrentUser -AllowClobber -SkipPublisherCheck foreach ($item in $modules) { @@ -14,6 +15,7 @@ foreach ($item in $modules) { Write-Host "Installing $item" -ForegroundColor Cyan Install-Module -Name $item -Force -Confirm:$false -Scope CurrentUser -AllowClobber -SkipPublisherCheck } - + Import-Module $item -Force + Get-Module -Name $item } \ No newline at end of file