build #244
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: 0 0 * * 0 # At 00:00 on Sunday. | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| permissions: | |
| contents: read | |
| runs-on: windows-2025 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| persist-credentials: false | |
| - 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 | |
| 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@80f7f261b2e62af5d7450c85317b194046aa91f5 # v4.0.1 | |
| - name: Scoop Version | |
| run: scoop --version | |
| - name: List Scoop Buckets | |
| run: scoop bucket list | |
| - name: Is scoop can install app? | |
| run: scoop install yq | |
| - name: List Scoop Apps | |
| run: scoop list | |
| - name: Run Unit Test | |
| shell: pwsh | |
| run: | | |
| $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 |