From e7d70b86ca15bdb70ba2377059db1904e20a135a Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Thu, 11 Jan 2024 21:29:06 -0600 Subject: [PATCH] update unit tests --- .github/workflows/unittests.yaml | 47 ++++++++++++++------------------ winutil.ps1 | 6 ++-- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 664e2fc560..e0f09573bb 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -18,30 +18,25 @@ jobs: failOnWarnings: false failOnInfos: false test: - runs-on: windows-latest + runs-on: ubuntu-latest + steps: - - name: Check out repository code - uses: actions/checkout@v3 - with: - ref: ${{ github.head_ref }} - - name: Create logs directory - run: New-Item -Path ${{ github.workspace }}\logs -ItemType Directory -Force - shell: pwsh - - name: pester_tests - id: pester_tests - uses: zyborg/pester-tests-report@v1 - with: - include_paths: pester - github_token: ${{ secrets.GITHUB_TOKEN }} - tests_fail_step: true - skip_check_run: true - continue-on-error: true - - name: Move test results - run: Move-Item -Path ${{ github.workspace }}\_TMP\* -Destination ${{ github.workspace }}\logs - shell: pwsh - - name: dump test results - shell: pwsh - run: | - Write-Host 'Total Tests Executed...: ${{ steps.pester_tests.outputs.total_count }}' - Write-Host 'Total Tests PASSED.....: ${{ steps.pester_tests.outputs.passed_count }}' - Write-Host 'Total Tests FAILED.....: ${{ steps.pester_tests.outputs.failed_count }}' \ No newline at end of file + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up PowerShell + uses: PowerShell/setup-powershell@v1 + with: + powershell-version: '7.0' # Specify the desired PowerShell version + + - name: Install Pester + run: | + Install-Module -Name Pester -Force -AllowClobber + shell: pwsh + + - name: Run Pester tests + run: | + # Change the path to your test file and script file accordingly + Invoke-Pester -Path 'pester/*.Tests.ps1' + + shell: pwsh \ No newline at end of file diff --git a/winutil.ps1 b/winutil.ps1 index fb191d24c2..b270896e7c 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -10,7 +10,7 @@ Author : Chris Titus @christitustech Runspace Author: @DeveloperDurp GitHub : https://github.com/ChrisTitusTech - Version : 24.01.12 + Version : 24.01.11 #> Start-Transcript $ENV:TEMP\Winutil.log -Append @@ -22,7 +22,7 @@ Add-Type -AssemblyName System.Windows.Forms # Variable to sync between runspaces $sync = [Hashtable]::Synchronized(@{}) $sync.PSScriptRoot = $PSScriptRoot -$sync.version = "24.01.12" +$sync.version = "24.01.11" $sync.configs = @{} $sync.ProcessRunning = $false @@ -4382,7 +4382,7 @@ $inputXML = ' - +