build #172
This file contains 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: | |
runs-on: windows-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v3 | |
- 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 | |
- 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: Run Unit Test | |
shell: pwsh | |
run: | | |
echo "* Begin test" | |
Invoke-Pester -CI |