-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.61 KB
/
Copy pathci.yml
File metadata and controls
59 lines (49 loc) · 1.61 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
name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Restore and build Windows desktop app
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout ARIEC61850 engine
uses: actions/checkout@v4
with:
repository: masarray/ARIEC61850
path: .deps/ARIEC61850
- name: Link ARIEC61850 project reference
shell: pwsh
run: |
$target = (Resolve-Path ".deps/ARIEC61850").Path
$link = Join-Path (Split-Path $env:GITHUB_WORKSPACE -Parent) "ARIEC61850"
if (Test-Path $link) {
Remove-Item $link -Recurse -Force
}
New-Item -ItemType Junction -Path $link -Target $target | Out-Null
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Restore
run: dotnet restore ARServer.sln
- name: Build
run: dotnet build ARServer.sln --configuration Release --no-restore
- name: Run tests when test projects exist
shell: pwsh
run: |
$testProjects = Get-ChildItem -Recurse -Filter *.csproj | Where-Object { $_.FullName -match '(?i)(test|tests)' }
if (-not $testProjects) {
Write-Host "No test projects found. Skipping dotnet test."
return
}
foreach ($project in $testProjects) {
dotnet test $project.FullName --configuration Release --no-build --verbosity normal
}