File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 build-and-test :
1717 runs-on : ubuntu-latest
1818
19- services :
20- postgres :
21- image : postgres:17
22- env :
23- POSTGRES_PASSWORD : postgres
24- POSTGRES_DB : bookstore
25- ports :
26- - 5432:5432
27- options : >-
28- --health-cmd pg_isready
29- --health-interval 10s
30- --health-timeout 5s
31- --health-retries 5
32-
3319 steps :
3420 - name : Checkout code
3521 uses : actions/checkout@v6
6450 working-directory : src/ApiService/BookStore.ApiService.Analyzers.Tests
6551 # Verify Roslyn analyzers work correctly
6652
67- - name : Run web integration tests
68- run : dotnet test --configuration Release --treenode-filter "/**[Category=Integration]"
69- working-directory : src/Web/BookStore.Web.Tests
70- timeout-minutes : 5
71- # Integration tests run after unit tests pass
72- # PostgreSQL service pre-started to reduce Aspire startup time
73-
7453 code-quality :
7554 runs-on : ubuntu-latest
7655
Original file line number Diff line number Diff line change 1313jobs :
1414 integration-tests :
1515 runs-on : ubuntu-latest
16-
17- services :
18- postgres :
19- image : postgres:17
20- env :
21- POSTGRES_PASSWORD : postgres
22- POSTGRES_DB : bookstore
23- ports :
24- - 5432:5432
25- options : >-
26- --health-cmd pg_isready
27- --health-interval 10s
28- --health-timeout 5s
29- --health-retries 5
16+ timeout-minutes : 30
3017
3118 steps :
3219 - name : Checkout code
3623 uses : actions/setup-dotnet@v5
3724 with :
3825 dotnet-version : ${{ env.DOTNET_VERSION }}
26+
27+ - name : Verify Docker availability
28+ run : |
29+ docker --version
30+ docker compose version
3931
4032 - name : Cache NuGet packages
4133 uses : actions/cache@v4
@@ -44,17 +36,19 @@ jobs:
4436 key : ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
4537 restore-keys : |
4638 ${{ runner.os }}-nuget-
47-
39+
4840 - name : Restore dependencies
4941 run : dotnet restore
5042
5143 - name : Build
5244 run : dotnet build --no-restore --configuration Release
5345
54- - name : Run all integration tests
55- run : dotnet test --configuration Release --treenode-filter "/**[Category=Integration]"
46+ - name : Run Aspire integration tests
47+ run : dotnet test --configuration Release --treenode-filter "/**[Category=Integration]" --verbosity detailed
5648 working-directory : src/Web/BookStore.Web.Tests
5749 timeout-minutes : 10
50+ # Aspire will start its own containers (PostgreSQL, Azurite, PgAdmin)
51+ # Extended timeout allows for container image downloads and startup
5852
5953 - name : Upload test results
6054 if : always()
You can’t perform that action at this time.
0 commit comments