@@ -57,34 +57,27 @@ $ErrorActionPreference = 'Stop'
57
57
# Get git ref name
58
58
$ref = Get-GitRef
59
59
60
- # # Run the workflow
61
- # Write-Host 'Queue workflow'
62
- # $workflow = 'record.yml'
63
- # Invoke-Command { & gh workflow run $workflow --ref $ref | Out-Null }
60
+ # Run the workflow
61
+ Write-Host ' Queue workflow'
62
+ $workflow = ' record.yml'
63
+ Invoke-Command { & gh workflow run $workflow -- ref $ref | Out-Null }
64
64
65
- # # Wait for a few seconds for the workflow to get created
66
- # Write-Host 'Wait a few seconds...'
67
- # Start-Sleep -Seconds 5
65
+ # Wait for a few seconds for the workflow to get created
66
+ Write-Host ' Wait a few seconds...'
67
+ Start-Sleep - Seconds 5
68
68
69
- # # Lookup the run id (it is not perfect because of the APIs...)
70
- # Write-Host 'Lookup run id'
71
- # $runId = Invoke-Command { & gh run list --workflow $workflow --branch $ref --limit 100 --json databaseId --jq '.[].databaseId' }
69
+ # Lookup the run id (it is not perfect because of the APIs...)
70
+ Write-Host ' Lookup run id'
71
+ $runId = Invoke-Command { & gh run list -- workflow $workflow -- branch $ref -- limit 100 -- json databaseId -- jq ' .[].databaseId' }
72
72
73
- # # Wait for the workflow to finish
74
- # Write-Host "Wait for workflow $runId to complete"
75
- # Invoke-Command { & gh run watch $runId --exit-status }
73
+ # Wait for the workflow to finish
74
+ Write-Host " Wait for workflow $runId to complete"
75
+ Invoke-Command { & gh run watch $runId -- exit-status }
76
76
77
- # # Download the artifacts in a temp folder
78
- # Write-Host 'Download artifacts'
79
- # $tempFolder = New-TemporaryFolder
80
- # Invoke-Command { & gh run download $runId --dir $tempFolder }
81
-
82
-
83
- # TEMP
84
- $tempFolder = ' /var/folders/0p/xh302z2x64b64_4l9xc5n7bm0000gn/T/959ec25f-986e-48b1-b6a8-155cd7ba62fe'
85
-
86
- Write-Host $tempFolder
87
- $runId = 2748946582
77
+ # Download the artifacts in a temp folder
78
+ Write-Host ' Download artifacts'
79
+ $tempFolder = New-TemporaryFolder
80
+ Invoke-Command { & gh run download $runId -- dir $tempFolder }
88
81
89
82
# Iterate over the test projects
90
83
Get-ChildItem - Path $testProjectsPath - Directory | ForEach-Object {
@@ -93,7 +86,7 @@ Get-ChildItem -Path $testProjectsPath -Directory | ForEach-Object {
93
86
if (Test-Path $artifactPath - PathType ' Container' ) {
94
87
# Copy artifact to the expected output folder
95
88
$destinationPath = Join-Path $testProjectsPath $_.BaseName ' _expected'
96
- Copy-Item - Path $artifactPath - Destination $destinationPath - Recurse | Out-Null
89
+ Copy-Item - Path ( Join-Path $artifactPath ' * ' ) - Destination $destinationPath - Recurse - Force | Out-Null
97
90
}
98
91
99
92
# Ignore test project
0 commit comments