Skip to content

Update ci.yml

Update ci.yml #60

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: ubuntu-latest
steps:
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@v2
# 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 'PSScriptAnalyzerSettings.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