Skip to content

Commit

Permalink
ci: split scoop run, and show test progress
Browse files Browse the repository at this point in the history
  • Loading branch information
guitarrapc committed Nov 14, 2023
1 parent ba93456 commit 4224f79
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
workflow_dispatch:
schedule:
- cron: 0 0 * * 0 # At 00:00 on Sunday.

push:
branches: ["main"]
pull_request:
Expand All @@ -14,31 +13,37 @@ jobs:
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Modules
shell: pwsh
run: |
Install-Module -Name PSScriptAnalyzer -Scope CurrentUser -Force
Install-Module -Name PowerShell-Yaml -Scope CurrentUser -Force
Install-Module -Name Pester -Scope CurrentUser -Force
Install-Module -Name Pester -Scope CurrentUser -Force -PathThru
Get-InstalledModule -Name PSScriptAnalyzer,PowerShell-Yaml,Pester
- name: Run PSScriptAnalyzer
shell: pwsh
run: |
Invoke-ScriptAnalyzer -Path ./src -Settings ./PSScriptAnalyzerSettings.psd1 -Severity Warning
Invoke-ScriptAnalyzer -Path ./src/ScoopPlaybook.psm1 -Settings CodeFormatting
- uses: MinoruSekine/setup-scoop@main # use @main to fix. see https://github.com/MinoruSekine/setup-scoop/issues/7
- name: Test Scoop installed
run: |
echo "* Show Scoop version"
scoop --version
echo "* Show Scoop buckets"
scoop bucket list
echo "* Show Scoop apps"
scoop list
echo "* Install git"
scoop install git
- name: Scoop Version
run: scoop --version
- name: Scoop Buckets
run: scoop bucket list
- name: Scoop Apps
run: scoop list
- name: Is scoop can install app?
run: scoop install yq
- name: Run Unit Test
shell: pwsh
run: |
echo "* Begin test"
Invoke-Pester -CI
$PesterPreference = New-PesterConfiguration
# Show each test progress. https://pester.dev/docs/usage/output
$PesterPreference.Output.Verbosity = 'Detailed'
$PesterPreference.Output.StackTraceVerbosity = 'Full'
$PesterPreference.Output.CIFormat = 'GitHubActions'
# -CI option https://pester.dev/docs/commands/Invoke-Pester#-ci
$PesterPreference.TestResult.Enabled = $true
$PesterPreference.Run.Exit = $true
Invoke-Pester -Configuration $PesterPreference

0 comments on commit 4224f79

Please sign in to comment.