-
Notifications
You must be signed in to change notification settings - Fork 15
62 lines (60 loc) · 1.61 KB
/
test_manifests.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Test Manifests
on:
pull_request:
types:
- opened
- reopened
paths:
- 'bucket/**'
push:
paths:
- 'bucket/**'
workflow_dispatch:
jobs:
test_powershell5:
name: Powershell 5
runs-on: windows-latest
steps:
- name: Checkout Bucket
uses: actions/checkout@main
with:
fetch-depth: 2
path: 'my_bucket'
- name: Checkout Scoop
uses: actions/checkout@main
with:
repository: ScoopInstaller/Scoop
ref: v0.3.0 # Pester 4
path: 'scoop_core'
- name: Checkout Scoop Main
uses: actions/checkout@main
with:
repository: ScoopInstaller/Main
path: 'scoop/buckets/main'
- name: Cache PS Modules
uses: potatoqualitee/[email protected]
with:
modules-to-cache: Pester:4.10.1, PSScriptAnalyzer, BuildHelpers
shell: powershell
- name: Cache Helpers
uses: actions/cache@v3
with:
path: scoop_global
key: ${{ runner.os }}-scoop-global-helpers
- name: Test Manifests
shell: powershell
run: |
cd .\my_bucket\
..\scoop_core\test\bin\test.ps1 -TestPath .
$result = $LASTEXITCODE
Write-Host "============ Install Log ============"
$log = 'Install.log'
if (Test-Path $log) {
Get-Content $log -Raw | Write-Host
}
exit $result
env:
GITHUB_PULL_REQUEST_BASE_SHA: ${{ github.event.pull_request.base.sha }}
SCOOP_HOME: ${{ github.workspace }}\scoop_core
SCOOP_GLOBAL: ${{ github.workspace }}\scoop_global
SCOOP: ${{ github.workspace }}\scoop