Skip to content

Add WhatIf to each functions #66

Add WhatIf to each functions

Add WhatIf to each functions #66

# This is a basic workflow to help you get started with Actions
name: Run-PesterTests and create PR
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ develop ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Run-PesterTests:
# The type of runner that the job will run on
strategy:
matrix:
platform: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
ref: develop
# Runs a set of commands using the runners shell
- name: Run Pester Tests on branch develop
run: |
cd PsNetTools
Import-Module -FullyQualifiedName .\PsNetTools.psd1
cd ../Tests
Invoke-Pester -Output Detailed
Remove-Module PsNetTools
shell: pwsh