-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (51 loc) · 1.54 KB
/
run-tests.yml
File metadata and controls
61 lines (51 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Run Tests
on:
pull_request:
branches:
- main
- develop
jobs:
test-linux:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/dotnet/sdk:10.0
steps:
- uses: actions/checkout@v5
- name: Restore Dependencies (ubuntu)
run: |
for project in tests/**/*.csproj; do
dotnet restore "$project"
done
- name: Build (ubuntu)
run: |
for project in tests/**/*.csproj; do
dotnet build "$project" --configuration Release --no-restore
done
- name: Test (ubuntu)
run: |
for project in tests/**/*.csproj; do
dotnet test "$project" --configuration Release --no-build
done
test-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Restore Dependencies (windows)
run: |
Get-ChildItem -Path tests -Filter *.csproj -Recurse | ForEach-Object {
dotnet restore $_.FullName
}
- name: Build (windows)
run: |
Get-ChildItem -Path tests -Filter *.csproj -Recurse | ForEach-Object {
dotnet build $_.FullName --configuration Release --no-restore
}
- name: Test (windows)
run: |
Get-ChildItem -Path tests -Filter *.csproj -Recurse | ForEach-Object {
dotnet test $_.FullName --configuration Release --no-build
}