@@ -40,18 +40,28 @@ jobs:
4040 STATUS_CHECK_URL : https://localhost:45039/status
4141
4242 steps :
43- - uses : actions/checkout@v4
43+ - uses : actions/checkout@v6
4444
4545 - name : " Install Node.js from package.json version"
46- uses : actions/setup-node@v4
46+ uses : actions/setup-node@v6
4747 with :
4848 node-version-file : " src/Kentico.Community.Portal.Web/package.json"
49+ cache : " npm"
50+ cache-dependency-path : " src/Kentico.Community.Portal.Web/package-lock.json"
4951
5052 - name : Setup .NET
51- uses : actions/setup-dotnet@v4
53+ uses : actions/setup-dotnet@v5
5254 with :
5355 global-json-file : global.json
5456
57+ - name : Cache NuGet packages
58+ uses : actions/cache@v5
59+ with :
60+ path : ~/.nuget/packages
61+ key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
62+ restore-keys : |
63+ ${{ runner.os }}-nuget-
64+
5565 - name : Install dependencies
5666 run : dotnet restore --locked-mode
5767
7383 -DestinationPath "./database"
7484
7585 - name : Install a SQL Server suite of tools (SQLEngine, SQLPackage)
76- uses : potatoqualitee/mssqlsuite@v1.8 # set as a commit hash for security
86+ uses : potatoqualitee/mssqlsuite@v1.11
7787 with :
7888 install : sqlpackage, sqlengine, sqlclient
7989 sa-password : Pass@12345
@@ -119,6 +129,16 @@ jobs:
119129 run : |
120130 ./Restore-CI.ps1
121131
132+ - name : Run Unit Tests
133+ run : |
134+ dotnet test `
135+ --test-modules ./test/Kentico.Community.Portal.Web.Tests/bin/Release/net10.0/Kentico.Community.Portal.Web.Tests.dll
136+
137+ - name : Run Integration Tests
138+ run : |
139+ dotnet test `
140+ --test-modules ./test/Kentico.Community.Portal.Web.Integration.Tests/bin/Release/net10.0/Kentico.Community.Portal.Web.Integration.Tests.dll
141+
122142 - name : Publish Application
123143 run : |
124144 dotnet publish `
@@ -128,10 +148,22 @@ jobs:
128148 --no-build `
129149 --no-restore
130150
151+ - name : Cache Playwright browsers
152+ id : playwright-cache
153+ uses : actions/cache@v5
154+ with :
155+ path : ~/.cache/ms-playwright
156+ key :
157+ ${{ runner.os }}-playwright-${{ hashFiles('**/packages.lock.json')
158+ }}
159+ restore-keys : |
160+ ${{ runner.os }}-playwright-
161+
131162 - name : Install Playwright Dependencies
163+ if : steps.playwright-cache.outputs.cache-hit != 'true'
132164 run : |
133165 # Must be path to the RELEASE build
134- ./test/Kentico.Community.Portal.Web.E2E.Tests/bin/Release/net9 .0/playwright.ps1 install
166+ ./test/Kentico.Community.Portal.Web.E2E.Tests/bin/Release/net10 .0/playwright.ps1 install
135167
136168 - name : Install Azurite from npm
137169 run : npm install -g azurite@3.33.0
@@ -174,10 +206,8 @@ jobs:
174206
175207 # Run the E2E tests
176208 dotnet test `
177- -c Release `
178- --no-build `
179- --no-restore `
180- -s ./test/e2e.runsettings
209+ --test-modules ./test/Kentico.Community.Portal.Web.E2E.Tests/bin/Release/net10.0/Kentico.Community.Portal.Web.E2E.Tests.dll `
210+ --settings ./test/e2e.runsettings
181211
182212 # Stop the background ASP.NET Core application
183213 Receive-Job -Name ${{ env.PROJECT_NAME }}
0 commit comments