Skip to content

Update unittests.yaml #390

Update unittests.yaml

Update unittests.yaml #390

Workflow file for this run

name: Unit Tests
on:
push:
jobs:
lint:
name: PS Script Analyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: lint
uses: devblackops/github-action-psscriptanalyzer@master
with:
sendComment: false
settingsPath: lint/PSScriptAnalyser.ps1
failOnErrors: false
failOnWarnings: false
failOnInfos: false
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up PowerShell
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x' # Specify the desired .NET Core SDK version
- name: Install Pester
run: |
pwsh -Command "Install-Module -Name Pester -Force -AllowClobber"
shell: bash
- name: Run Pester tests
run: |
# Change the path to your test file and script file accordingly
pwsh -Command "Invoke-Pester -Path 'pester/*.Tests.ps1'"
shell: bash