Skip to content

Update unittests.yaml #383

Update unittests.yaml

Update unittests.yaml #383

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: windows-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Create logs directory
run: New-Item -Path ${{ github.workspace }}\logs -ItemType Directory -Force
shell: pwsh
- name: pester_tests
id: pester_tests
uses: zyborg/pester-tests-report@v1
with:
include_paths: pester
github_token: ${{ secrets.GITHUB_TOKEN }}
tests_fail_step: true
skip_check_run: true
test_results_path: '${{ github.workspace }}/logs'
- name: dump test results
shell: pwsh
run: |
Write-Host 'Total Tests Executed...: ${{ steps.pester_tests.outputs.total_count }}'
Write-Host 'Total Tests PASSED.....: ${{ steps.pester_tests.outputs.passed_count }}'
Write-Host 'Total Tests FAILED.....: ${{ steps.pester_tests.outputs.failed_count }}'