Skip to content

Commit baa11fb

Browse files
Bump test dependencies to resolve System.Net.Http vulnerability, update workflows and README (#692)
* update test deps, workflows, and docs for latest versions * fix wording * update versions
1 parent 24ec4f2 commit baa11fb

File tree

10 files changed

+318
-1813
lines changed

10 files changed

+318
-1813
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 186 additions & 404 deletions
Large diffs are not rendered by default.

.github/workflows/test-dotnet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
macos-15-intel,
2626
macos-latest
2727
]
28-
dotnet-version: ['6.0', '7.0', '8.0', '9.0']
28+
dotnet-version: ['8.0', '9.0', '10.0']
2929
steps:
3030
- name: Checkout
3131
uses: actions/checkout@v6

README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ See [action.yml](action.yml)
2929
**Basic**:
3030
```yaml
3131
steps:
32-
- uses: actions/checkout@v5
32+
- uses: actions/checkout@v6
3333
- uses: actions/setup-dotnet@v5
3434
with:
3535
dotnet-version: '8.0.x'
@@ -40,7 +40,7 @@ steps:
4040
**Multiple version installation**:
4141
```yml
4242
steps:
43-
- uses: actions/checkout@v5
43+
- uses: actions/checkout@v6
4444
- name: Setup dotnet
4545
uses: actions/setup-dotnet@v5
4646
with:
@@ -53,7 +53,7 @@ steps:
5353

5454
The `dotnet-version` input supports following syntax:
5555

56-
- **A.B.C** (e.g 6.0.400, 7.0.100-preview.7.22377.5) - installs exact version of .NET SDK
56+
- **A.B.C** (e.g 9.0.308, 10.0.100-preview.1.25120.13) - installs exact version of .NET SDK
5757
- **A.B** or **A.B.x** (e.g. 8.0, 8.0.x) - installs the latest patch version of .NET SDK on the channel `8.0`, including prerelease versions (preview, rc)
5858
- **A** or **A.x** (e.g. 8, 8.x) - installs the latest minor version of the specified major tag, including prerelease versions (preview, rc)
5959
- **A.B.Cxx** (e.g. 8.0.4xx) - available since `.NET 5.0` release. Installs the latest version of the specific SDK release, including prerelease versions (preview, rc).
@@ -66,7 +66,7 @@ This input sets up the action to install the latest build of the specified quali
6666

6767
```yml
6868
steps:
69-
- uses: actions/checkout@v5
69+
- uses: actions/checkout@v6
7070
- uses: actions/setup-dotnet@v5
7171
with:
7272
dotnet-version: '8.0.x'
@@ -81,7 +81,7 @@ steps:
8181

8282
```yml
8383
steps:
84-
- uses: actions/checkout@v5
84+
- uses: actions/checkout@v6
8585
- uses: actions/setup-dotnet@v5
8686
with:
8787
global-json-file: csharp/global.json
@@ -98,7 +98,7 @@ The action searches for [NuGet Lock files](https://learn.microsoft.com/nuget/con
9898

9999
```yaml
100100
steps:
101-
- uses: actions/checkout@v5
101+
- uses: actions/checkout@v6
102102
- uses: actions/setup-dotnet@v5
103103
with:
104104
dotnet-version: 8.x
@@ -123,7 +123,7 @@ steps:
123123
env:
124124
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
125125
steps:
126-
- uses: actions/checkout@v5
126+
- uses: actions/checkout@v6
127127
- uses: actions/setup-dotnet@v5
128128
with:
129129
dotnet-version: 8.x
@@ -137,7 +137,7 @@ steps:
137137
env:
138138
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
139139
steps:
140-
- uses: actions/checkout@v5
140+
- uses: actions/checkout@v6
141141
- uses: actions/setup-dotnet@v5
142142
with:
143143
dotnet-version: 8.x
@@ -154,10 +154,10 @@ jobs:
154154
runs-on: ubuntu-latest
155155
strategy:
156156
matrix:
157-
dotnet: [ '7.0.x', '8.0.x', '9.0.x' ]
157+
dotnet: [ '8.0.x', '9.0.x', '10.0.x' ]
158158
name: Dotnet ${{ matrix.dotnet }} sample
159159
steps:
160-
- uses: actions/checkout@v5
160+
- uses: actions/checkout@v6
161161
- name: Setup dotnet
162162
uses: actions/setup-dotnet@v5
163163
with:
@@ -174,10 +174,10 @@ jobs:
174174
runs-on: ubuntu-latest
175175
strategy:
176176
matrix:
177-
dotnet: [ '7.0.x', '8.0.x', '9.0.x' ]
177+
dotnet: [ '8.0.x', '9.0.x', '10.0.x' ]
178178
name: Dotnet ${{ matrix.dotnet }} sample
179179
steps:
180-
- uses: actions/checkout@v5
180+
- uses: actions/checkout@v6
181181
- name: Setup dotnet
182182
uses: actions/setup-dotnet@v5
183183
id: stepid
@@ -188,12 +188,13 @@ jobs:
188188
- name: Execute dotnet
189189
run: dotnet build <my project>
190190
```
191+
>**Note**: When generating a temporary `global.json` within your workflow on Windows, ensure the command is executed using a shell such as PowerShell Core (`pwsh`) or `bash` (where supported) to avoid formatting inconsistencies that could cause .NET commands to fail.
191192
## Setting up authentication for nuget feeds
192193

193194
### Github Package Registry (GPR)
194195
```yml
195196
steps:
196-
- uses: actions/checkout@v5
197+
- uses: actions/checkout@v6
197198
- uses: actions/setup-dotnet@v5
198199
with:
199200
dotnet-version: '8.0.x'
@@ -246,8 +247,8 @@ In case of a single version installation, the `dotnet-version` output contains t
246247
- uses: actions/setup-dotnet@v5
247248
id: stepid
248249
with:
249-
dotnet-version: 8.0.402
250-
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 8.0.402
250+
dotnet-version: 8.0.416
251+
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 8.0.416
251252
```
252253

253254
**Multiple version installation**
@@ -259,9 +260,9 @@ In case of a multiple version installation, the `dotnet-version` output contains
259260
id: stepid
260261
with:
261262
dotnet-version: |
262-
8.0.402
263-
9.0.301
264-
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 9.0.301
263+
8.0.416
264+
9.0.308
265+
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 9.0.308
265266
```
266267
**Installation from global.json**
267268

@@ -272,10 +273,10 @@ When the `dotnet-version` input is used along with the `global-json-file` input,
272273
id: stepid
273274
with:
274275
dotnet-version: |
275-
8.0.402
276-
9.0.301
277-
global-json-file: "./global.json" # contains version 7.0.410
278-
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 7.0.410
276+
9.0.308
277+
10.0.101
278+
global-json-file: "./global.json" # contains version 8.0.416
279+
- run: echo '${{ steps.stepid.outputs.dotnet-version }}' # outputs 8.0.416
279280
```
280281

281282
### `cache-hit`
@@ -308,7 +309,7 @@ build:
308309
DOTNET_INSTALL_DIR: "path/to/directory"
309310
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
310311
steps:
311-
- uses: actions/checkout@main
312+
- uses: actions/checkout@v6
312313
- uses: actions/setup-dotnet@v5
313314
with:
314315
dotnet-version: '8.0.x'
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
using Microsoft.VisualStudio.TestTools.UnitTesting;
2+
3+
// Sequential test execution
4+
[assembly: DoNotParallelize]

__tests__/e2e-test-csproj/Test.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public void TestMethod()
1212
Console.WriteLine("TestMethod");
1313
int calculatedResult = 1000 / 25;
1414
int expectedResult = 40;
15-
Assert.AreEqual(calculatedResult, expectedResult);
15+
Assert.AreEqual(expectedResult, calculatedResult);
1616
}
1717
}
1818
}

0 commit comments

Comments
 (0)