Skip to content

Commit

Permalink
Merge pull request #409 from BalassaMarton/ci-build-scripts
Browse files Browse the repository at this point in the history
.NET build scripts
  • Loading branch information
BalassaMarton authored Jan 8, 2024
2 parents 548bed5 + 0e55021 commit 6ae9638
Showing 1 changed file with 46 additions and 6 deletions.
52 changes: 46 additions & 6 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,21 @@ jobs:
build:
env:
COMPOSEUI_SKIP_DOWNLOAD: 'true'
DOTNET_CONSOLE_ANSI_COLOR: 'true'
runs-on: windows-latest
strategy:
matrix:
dotnet-version: [ '6.0.x' ]
node-version: [ '18.x' ]
steps:
- uses: actions/checkout@v3

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
COMPOSEUI_SKIP_DOWNLOAD: ${{env.COMPOSEUI_SKIP_DOWNLOAD}}

- name: Install NPM dependencies
run: npm ci

Expand All @@ -43,14 +46,51 @@ jobs:
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install Nuget dependencies
run: Get-ChildItem -Recurse -Include *.sln | ForEach-Object {dotnet restore $_}

- name: Build .Net
run: Get-ChildItem -Recurse -Include *.sln | ForEach-Object {dotnet build $_ --configuration Release --no-restore; if ($LASTEXITCODE -ne 0 ) {throw "Build for $_ FAILED"; }}
- name: Install NuGet dependencies
run: |
$failedSolutions = @()
Get-ChildItem -Recurse -Include *.sln `
| ForEach-Object {
dotnet restore $_;
if ($LASTEXITCODE -ne 0) {$failedSolutions += Split-Path $_ -leaf; }
}
if ($failedSolutions.count -gt 0) {
throw "Restore FAILED for solutions $failedSolutions"
}
- name: Build .NET
run: |
$failedSolutions = @()
Get-ChildItem -Recurse -Include *.sln `
| ForEach-Object {
dotnet build $_ --configuration Release --no-restore;
if ($LASTEXITCODE -ne 0) {$failedSolutions += Split-Path $_ -leaf; }
}
if ($failedSolutions.count -gt 0) {
throw "Build FAILED for solutions $failedSolutions"
}
- name: Test .NET
run: |
$failedSolutions = @()
Get-ChildItem -Recurse -Include *.sln `
| ForEach-Object {
dotnet test $_ --configuration Release --no-build;
if ($LASTEXITCODE -ne 0) { $failedSolutions += Split-Path $_ -leaf; }
}
if ($failedSolutions.count -gt 0) {
throw "Test FAILED for solutions $failedSolutions"
}
- name: Test .Net
run: Get-ChildItem -Recurse -Include *.sln | ForEach-Object {dotnet test $_ --configuration Release --no-restore --verbosity normal --collect:"XPlat Code Coverage"; if ($LASTEXITCODE -ne 0 ) {throw "Test for $_ FAILED"; }}
- name: Codecov
uses: codecov/[email protected]
Expand Down

0 comments on commit 6ae9638

Please sign in to comment.