Skip to content

Move Cmdlets to root folder #137

Move Cmdlets to root folder

Move Cmdlets to root folder #137

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
verify:
runs-on: windows-latest
steps:
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@v3
# Print Powershell version
- name: Powershell Environment
shell: pwsh
run: |
$PSVersionTable
# Run linter
- name: Run linter (via PSScriptAnalyzer)
shell: pwsh
run: |
$ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = 'Stop'
Install-Module -Name PSScriptAnalyzer -SkipPublisherCheck -Scope CurrentUser -MinimumVersion 1.19.1 -Force -Verbose
Invoke-ScriptAnalyzer -Path $env:GITHUB_WORKSPACE -Recurse -Settings (Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath 'Linters\PSScriptAnalyzer.psd1') -ReportSummary -EnableExit
# Run tests
- name: Run tests (via Pester)
shell: pwsh
run: |
$ProgressPreference = 'SilentlyContinue'
Install-Module -Name Pester -SkipPublisherCheck -Scope CurrentUser -MinimumVersion 5.1.1 -Force -Verbose
Invoke-Pester -Path $env:GITHUB_WORKSPACE -Output Detailed -CI
# Build package
- name: Package Build
shell: pwsh
run: |
$ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = 'Stop'
Install-Module -Name platyPS, BuildHelpers -SkipPublisherCheck -Scope CurrentUser -Force
& (Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath 'Build\New-Package.ps1') -Verbose