-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.32 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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