Skip to content

Commit 7df669c

Browse files
Drop performance/test artifacts from PR branch
1 parent ef35ced commit 7df669c

4 files changed

Lines changed: 0 additions & 219 deletions

File tree

scripts/Measure-InstallPerformance.ps1

Lines changed: 0 additions & 94 deletions
This file was deleted.

scripts/README.md

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -91,30 +91,3 @@ To test changes to the update script:
9191
- **No updates available**: If the Google Fonts API returns the same data, no PR will be created
9292
- **Authentication errors**: Ensure the GitHub App credentials are correctly configured
9393
- **API rate limits**: The Google Fonts API key must have sufficient quota for daily requests
94-
95-
## Wait-ForCopilotAndCI.ps1
96-
97-
This script continuously polls a pull request and only exits when all of the following are true:
98-
99-
- CI checks are green (no pending checks and no failures)
100-
- Copilot review has completed for the latest PR head commit
101-
- There are no unresolved review threads that contain Copilot comments
102-
103-
The loop never exits just because it is waiting. It keeps polling until all gates are satisfied.
104-
105-
### Usage
106-
107-
```powershell
108-
pwsh ./scripts/Wait-ForCopilotAndCI.ps1 -PullRequestNumber 210
109-
```
110-
111-
Optional parameters:
112-
113-
- `-Owner` and `-Repository` to target another repo (defaults to `PSModule/GoogleFonts`)
114-
- `-PollIntervalSeconds` to adjust polling interval (default: `30`)
115-
116-
Example with explicit repo and interval:
117-
118-
```powershell
119-
pwsh ./scripts/Wait-ForCopilotAndCI.ps1 -Owner PSModule -Repository GoogleFonts -PullRequestNumber 210 -PollIntervalSeconds 45
120-
```

scripts/perf-results.jsonl

Lines changed: 0 additions & 24 deletions
This file was deleted.

tests/GoogleFonts.Tests.ps1

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -19,83 +19,9 @@
1919
Get-Font -Name 'Akshar*' | Should -Not -BeNullOrEmpty
2020
}
2121

22-
It '[Install-GoogleFont] - Skips an already-installed font' {
23-
{ Install-GoogleFont -Name 'Akshar' } | Should -Not -Throw
24-
$verboseOutput = Install-GoogleFont -Name 'Akshar' -Verbose 4>&1
25-
($verboseOutput | Out-String) | Should -Match 'Installing \[0\] fonts'
26-
}
27-
28-
It '[Install-GoogleFont] - Supports wildcard names' {
29-
{ Install-GoogleFont -Name 'ABee*' } | Should -Not -Throw
30-
Get-Font -Name 'ABee*' | Should -Not -BeNullOrEmpty
31-
}
32-
3322
# It '[Install-GoogleFont] - Installs all fonts' {
3423
# { Install-GoogleFont -All -Verbose } | Should -Not -Throw
3524
# Get-Font -Name 'Nabla*' | Should -Not -BeNullOrEmpty
3625
# }
3726
}
38-
39-
InModuleScope GoogleFonts {
40-
Context 'Function: Install-GoogleFont (mocked download paths)' {
41-
BeforeEach {
42-
$script:originalGoogleFonts = $script:GoogleFonts
43-
$script:originalDisableParallel = $env:PSMODULE_GOOGLEFONTS_DISABLE_PARALLEL
44-
$script:originalDisableParallelForTests = $script:DisableParallelDownloadsForTests
45-
$env:PSMODULE_GOOGLEFONTS_DISABLE_PARALLEL = '1'
46-
$script:DisableParallelDownloadsForTests = $true
47-
48-
$script:GoogleFonts = @(
49-
[pscustomobject]@{
50-
Name = 'UnitTestFont'
51-
Variant = 'regular'
52-
URL = 'https://example.invalid/unittestfont.ttf'
53-
}
54-
)
55-
56-
Mock -CommandName Get-Font -MockWith { @() }
57-
Mock -CommandName Install-Font -MockWith { }
58-
Mock -CommandName Copy-Item -MockWith { }
59-
Mock -CommandName New-Item -MockWith { [pscustomobject]@{ FullName = 'mock' } }
60-
Mock -CommandName Test-Admin -MockWith { $true }
61-
}
62-
63-
AfterEach {
64-
$script:GoogleFonts = $script:originalGoogleFonts
65-
$env:PSMODULE_GOOGLEFONTS_DISABLE_PARALLEL = $script:originalDisableParallel
66-
$script:DisableParallelDownloadsForTests = $script:originalDisableParallelForTests
67-
}
68-
69-
It '[Install-GoogleFont] - Uses cache hit path without new download' {
70-
Mock -CommandName Test-Path -MockWith {
71-
param(
72-
[string] $Path,
73-
[string] $LiteralPath,
74-
[object] $PathType
75-
)
76-
77-
if ($PSBoundParameters.ContainsKey('LiteralPath')) {
78-
return $true
79-
}
80-
81-
return $true
82-
}
83-
84-
Mock -CommandName Invoke-WebRequest -MockWith {
85-
throw 'Invoke-WebRequest should not be called when cache is used'
86-
}
87-
88-
{ Install-GoogleFont -Name 'UnitTestFont' -Confirm:$false } | Should -Not -Throw
89-
Assert-MockCalled -CommandName Invoke-WebRequest -Times 0 -Exactly
90-
Assert-MockCalled -CommandName Copy-Item -Times 1
91-
Assert-MockCalled -CommandName Install-Font -Times 1 -Exactly
92-
}
93-
94-
It '[Install-GoogleFont] - Throws for AllUsers scope without admin rights' {
95-
Mock -CommandName Test-Admin -MockWith { $false }
96-
97-
{ Install-GoogleFont -Name 'UnitTestFont' -Scope AllUsers -Confirm:$false } | Should -Throw
98-
}
99-
}
100-
}
10127
}

0 commit comments

Comments
 (0)