-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (49 loc) · 2.23 KB
/
dotnet.yml
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
name: Dotnet
on:
pull_request:
branches:
- develop
jobs:
build:
name: Build and test
runs-on: windows-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Clean
run: dotnet clean ./Orso.Arpa.Api.sln --configuration Release && dotnet nuget locals all --clear
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Run Misc Unit Tests
run: dotnet test Tests/Orso.Arpa.Misc.Tests/Orso.Arpa.Misc.Tests.csproj --no-build --verbosity normal --configuration Release
- name: Run Mail Unit Tests
run: dotnet test Tests/Orso.Arpa.Mail.Tests/Orso.Arpa.Mail.Tests.csproj --no-build --verbosity normal --configuration Release
- name: Run Infrastructure Unit Tests
run: dotnet test ./Tests/Orso.Arpa.Infrastructure.Tests/Orso.Arpa.Infrastructure.Tests.csproj --no-build --verbosity normal --configuration Release
- name: Run Domain Unit Tests
run: dotnet test ./Tests/Orso.Arpa.Domain.Tests/Orso.Arpa.Domain.Tests.csproj --no-build --verbosity normal --configuration Release
- name: Run Application Unit Tests
run: dotnet test ./Tests/Orso.Arpa.Application.Tests/Orso.Arpa.Application.Tests.csproj --no-build --verbosity normal --configuration Release
- name: Setup Node.js environment
uses: actions/setup-node@v4
- name: Install Azurite Emulator
run: npm install -g azurite
- name: Run Azurite in Background
shell: bash
run: azurite &
- name: Start PostgreSQL on Windows
run: |
$pgService = Get-Service -Name postgresql*
Set-Service -InputObject $pgService -Status running -StartupType automatic
Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait -PassThru
- name: Create integration test user on Windows
run: |
& $env:PGBIN\psql --command="CREATE USER integration_test_user WITH SUPERUSER PASSWORD 'integration'" --command="\du"
- name: Run Api Integration Tests
run: dotnet test Tests/Orso.Arpa.Api.Tests/Orso.Arpa.Api.Tests.csproj --no-build --verbosity normal --configuration Release