Skip to content

Commit 243bd03

Browse files
authored
Merge pull request #51 from santisq/50-update-ci-actions
Updates CI actions
2 parents 5b724a5 + c8200c8 commit 243bd03

4 files changed

Lines changed: 17 additions & 13 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: windows-latest
2626
steps:
2727
- name: Check out repository
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v6
2929

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

4040
- name: Capture PowerShell Module
41-
uses: actions/upload-artifact@v4
41+
uses: actions/upload-artifact@v7
4242
with:
4343
name: PSModule
4444
path: output/*.nupkg
@@ -63,10 +63,10 @@ jobs:
6363
os: ubuntu-latest
6464

6565
steps:
66-
- uses: actions/checkout@v4
66+
- uses: actions/checkout@v6
6767

6868
- name: Restore Built PowerShell Module
69-
uses: actions/download-artifact@v4
69+
uses: actions/download-artifact@v8
7070
with:
7171
name: PSModule
7272
path: output
@@ -103,21 +103,21 @@ jobs:
103103
104104
- name: Upload Test Results
105105
if: always()
106-
uses: actions/upload-artifact@v4
106+
uses: actions/upload-artifact@v7
107107
with:
108108
name: Unit Test Results (${{ matrix.info.name }})
109109
path: ./output/TestResults/Pester.xml
110110

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

118118
- name: Upload Coverage to codecov
119119
if: always() && !startsWith(github.ref, 'refs/tags/v')
120-
uses: codecov/codecov-action@v4
120+
uses: codecov/codecov-action@v6
121121
with:
122122
files: ./output/TestResults/Coverage.xml
123123
flags: ${{ matrix.info.name }}
@@ -132,7 +132,7 @@ jobs:
132132
runs-on: windows-latest
133133
steps:
134134
- name: Restore Built PowerShell Module
135-
uses: actions/download-artifact@v4
135+
uses: actions/download-artifact@v8
136136
with:
137137
name: PSModule
138138
path: ./

src/PSCompression/AlgorithmMappings.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace PSCompression;
66

77
internal static class AlgorithmMappings
88
{
9-
private static readonly Dictionary<string, Algorithm> _mappings = new(
9+
private static readonly Dictionary<string, Algorithm> s_mappings = new(
1010
StringComparer.InvariantCultureIgnoreCase)
1111
{
1212
// Gzip
@@ -31,5 +31,6 @@ internal static class AlgorithmMappings
3131
};
3232

3333
internal static Algorithm Parse(string path) =>
34-
_mappings.TryGetValue(Path.GetExtension(path), out Algorithm value) ? value : Algorithm.none;
34+
s_mappings.TryGetValue(Path.GetExtension(path), out Algorithm value)
35+
? value : Algorithm.none;
3536
}

src/PSCompression/internal/_Format.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace PSCompression.Internal;
1111
[EditorBrowsable(EditorBrowsableState.Never)]
1212
public static class _Format
1313
{
14-
private static readonly CultureInfo _culture = CultureInfo.CurrentCulture;
14+
private static readonly CultureInfo s_culture = CultureInfo.CurrentCulture;
1515

1616
private readonly static string[] s_suffix =
1717
[
@@ -31,7 +31,7 @@ public static class _Format
3131

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

3636
[Hidden, EditorBrowsable(EditorBrowsableState.Never)]
3737
public static string GetFormattedLength(long length)

tools/InvokeBuild.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ task PesterTests {
8787

8888
if (-not (dotnet tool list --global | Select-String coverlet.console -SimpleMatch)) {
8989
Write-Host 'Installing dotnet tool coverlet.console' -ForegroundColor Yellow
90-
dotnet tool install --global coverlet.console
90+
dotnet @(
91+
'tool', 'install'
92+
'--global', 'coverlet.console'
93+
if (-not $IsCoreCLR) { '--version', '6.0.4' })
9194
}
9295

9396
coverlet $ProjectInfo.Pester.GetTestArgs($PSVersionTable.PSVersion)

0 commit comments

Comments
 (0)