Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Build module - Debug
shell: pwsh
Expand All @@ -38,7 +38,7 @@ jobs:
if: ${{ env.BUILD_CONFIGURATION == 'Release' }}

- name: Capture PowerShell Module
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: PSModule
path: output/*.nupkg
Expand All @@ -63,10 +63,10 @@ jobs:
os: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Restore Built PowerShell Module
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: PSModule
path: output
Expand Down Expand Up @@ -103,21 +103,21 @@ jobs:

- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: Unit Test Results (${{ matrix.info.name }})
path: ./output/TestResults/Pester.xml

- name: Upload Coverage Results
if: always() && !startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: Coverage Results (${{ matrix.info.name }})
path: ./output/TestResults/Coverage.xml

- name: Upload Coverage to codecov
if: always() && !startsWith(github.ref, 'refs/tags/v')
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v6
with:
files: ./output/TestResults/Coverage.xml
flags: ${{ matrix.info.name }}
Expand All @@ -132,7 +132,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Restore Built PowerShell Module
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: PSModule
path: ./
Expand Down
5 changes: 3 additions & 2 deletions src/PSCompression/AlgorithmMappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace PSCompression;

internal static class AlgorithmMappings
{
private static readonly Dictionary<string, Algorithm> _mappings = new(
private static readonly Dictionary<string, Algorithm> s_mappings = new(
StringComparer.InvariantCultureIgnoreCase)
{
// Gzip
Expand All @@ -31,5 +31,6 @@ internal static class AlgorithmMappings
};

internal static Algorithm Parse(string path) =>
_mappings.TryGetValue(Path.GetExtension(path), out Algorithm value) ? value : Algorithm.none;
s_mappings.TryGetValue(Path.GetExtension(path), out Algorithm value)
? value : Algorithm.none;
}
4 changes: 2 additions & 2 deletions src/PSCompression/internal/_Format.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace PSCompression.Internal;
[EditorBrowsable(EditorBrowsableState.Never)]
public static class _Format
{
private static readonly CultureInfo _culture = CultureInfo.CurrentCulture;
private static readonly CultureInfo s_culture = CultureInfo.CurrentCulture;

private readonly static string[] s_suffix =
[
Expand All @@ -31,7 +31,7 @@ public static class _Format

[Hidden, EditorBrowsable(EditorBrowsableState.Never)]
public static string GetFormattedDate(DateTime dateTime) =>
string.Format(_culture, "{0,10:d} {0,8:t}", dateTime);
string.Format(s_culture, "{0,10:d} {0,8:t}", dateTime);

[Hidden, EditorBrowsable(EditorBrowsableState.Never)]
public static string GetFormattedLength(long length)
Expand Down
5 changes: 4 additions & 1 deletion tools/InvokeBuild.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ task PesterTests {

if (-not (dotnet tool list --global | Select-String coverlet.console -SimpleMatch)) {
Write-Host 'Installing dotnet tool coverlet.console' -ForegroundColor Yellow
dotnet tool install --global coverlet.console
dotnet @(
'tool', 'install'
'--global', 'coverlet.console'
if (-not $IsCoreCLR) { '--version', '6.0.4' })
}

coverlet $ProjectInfo.Pester.GetTestArgs($PSVersionTable.PSVersion)
Expand Down