-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.51 KB
/
Copy pathgithub-ci.yml
File metadata and controls
40 lines (38 loc) · 1.51 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
on: [push, pull_request]
jobs:
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Build
run: for file in $(find -name "*.sln"); do dotnet build $file; done
- name: Test
run: for file in $(find -name "*.sln"); do dotnet test $file; done
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
- name: Prepare environment with Coyote
shell: pwsh
run: |
$projectPaths = Get-ChildItem -Path . -Filter *.csproj -Recurse -File | ForEach-Object { $_.DirectoryName }
foreach ($projectPath in $projectPaths) {
Set-Location $projectPath
dotnet tool install --global Microsoft.Coyote.CLI
dotnet restore
$lnContent = Get-ChildItem -Recurse -Filter *.dll; foreach ($file in $lnContent) {coyote rewrite $file.FullName}
Set-Location -Path ..\..
}
echo "${{ github.workspace }}/.dotnet/tools" >> $GITHUB_PATH
- name: Build
run: $lnContent = Get-ChildItem -Recurse -Filter '*.sln'; foreach ($file in $lnContent) {dotnet build $file.FullName}
- name: Test
run: $lnContent = Get-ChildItem -Recurse -Filter '*.sln'; foreach ($file in $lnContent) {dotnet test $file.FullName}