From a6ea0667afc45e9da77f650bccba7debc34b2ea4 Mon Sep 17 00:00:00 2001 From: Claudio Spizzi Date: Mon, 9 Sep 2024 22:16:36 +0200 Subject: [PATCH] Update CI --- .github/workflows/ci.yml | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bcacdd..91d3e8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,35 +2,42 @@ name: CI on: push: - branches: - - main + branches: [ "main" ] + pull_request: + branches: [ "main" ] jobs: windows-powershell-legacy: - name: Windows / PowerShell 5.1 + name: Windows PowerShell 5.1 runs-on: windows-latest steps: + - name: Check out repository code - uses: actions/checkout@v3 + uses: actions/checkout@v4 + - name: Install and cache PowerShell modules - uses: potatoqualitee/psmodulecache@v5.2 + uses: potatoqualitee/psmodulecache@v6.2 with: shell: powershell updatable: true - modules-to-cache: "InvokeBuild::, InvokeBuildHelper::" + modules-to-cache: "InvokeBuild::, InvokeBuildHelper::, Pester:4.10.1" + - name: Build the PowerShell module assemblies shell: powershell run: | - Invoke-Build -Task 'Build' + Invoke-BuildIsolated -Task 'Build' -PesterVersion v4 + - name: Run PowerShell module Schema tests shell: powershell run: | - Invoke-Build -Task 'SchemaTest' + Invoke-BuildIsolated -Task 'SchemaTest' -PesterVersion v4 + - name: Run PowerShell module Unit tests shell: powershell run: | - Invoke-Build -Task 'UnitTest' + Invoke-BuildIsolated -Task 'UnitTest' -PesterVersion v4 + - name: Run PowerShell module Analyzer tests shell: powershell run: | - Invoke-Build -Task 'AnalyzerTest' + Invoke-BuildIsolated -Task 'AnalyzerTest' -PesterVersion v4