Skip to content

Commit b0b6830

Browse files
committed
full project and tests
1 parent f3f998a commit b0b6830

File tree

492 files changed

+40072
-423
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

492 files changed

+40072
-423
lines changed

.azuredevops/pipelines/build-and-release.yml

Lines changed: 0 additions & 137 deletions
This file was deleted.

.azuredevops/pipelines/steps.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.config/dotnet-tools.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 71 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,57 +7,85 @@ on:
77
branches: [main]
88

99
jobs:
10-
dotnet-format:
11-
name: .Net Format Check
10+
test:
11+
timeout-minutes: 60
1212
runs-on: ubuntu-latest
13-
14-
steps:
15-
- uses: actions/checkout@v6
16-
17-
- name: Setup .NET
18-
uses: actions/setup-dotnet@v5
19-
with:
20-
global-json-file: global.json
21-
22-
- name: Run dotnet format
23-
run: dotnet format Kentico.Xperience.RepoTemplate.slnx --exclude ./examples/** --verify-no-changes
24-
25-
build_and_test:
26-
name: Build and Test
27-
runs-on: ubuntu-latest
28-
needs: dotnet-format
13+
env:
14+
SQL_SERVER_HOST: localhost
15+
SQL_SERVER_SA_PASSWORD: Pass@12345
16+
SQL_SERVER_DATABASE: xk-31-02-03
2917
defaults:
3018
run:
31-
shell: pwsh
32-
33-
env:
34-
ASPNETCORE_ENVIRONMENT: CI
35-
DOTNET_CLI_TELEMETRY_OPTOUT: 1
36-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
37-
DOTNET_NOLOGO: 1
38-
19+
working-directory: tests
3920
steps:
4021
- uses: actions/checkout@v6
41-
42-
- name: Setup .NET
43-
uses: actions/setup-dotnet@v5
22+
- uses: actions/setup-node@v6
23+
with:
24+
node-version: lts/*
25+
cache: npm
26+
cache-dependency-path: tests/package-lock.json
27+
- uses: actions/setup-dotnet@v5
4428
with:
4529
global-json-file: global.json
46-
47-
- name: Install dependencies
30+
- name: Restore .NET dependencies
31+
working-directory: .
32+
run: dotnet restore
33+
- name: Build .NET solution
34+
working-directory: .
35+
run: dotnet build --no-restore
36+
- name: Restore Dancing Goat tools
37+
working-directory: examples/DancingGoat
38+
run: dotnet tool restore
39+
- name: Start SQL Server
4840
run: |
49-
dotnet restore `
50-
--locked-mode
51-
52-
- name: Build Solution
41+
docker run --name xperience-sql \
42+
-e ACCEPT_EULA=Y \
43+
-e MSSQL_SA_PASSWORD="$SQL_SERVER_SA_PASSWORD" \
44+
-p 1433:1433 \
45+
-d mcr.microsoft.com/mssql/server:2022-latest
46+
- name: Wait for SQL Server
5347
run: |
54-
dotnet build `
55-
--configuration Release `
56-
--no-restore
48+
for attempt in {1..60}; do
49+
if docker exec xperience-sql /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "$SQL_SERVER_SA_PASSWORD" -C -Q "SELECT 1" >/dev/null 2>&1; then
50+
exit 0
51+
fi
5752
58-
- name: Test Solution
53+
sleep 2
54+
done
55+
56+
docker logs xperience-sql
57+
exit 1
58+
- name: Install Xperience database
59+
working-directory: examples/DancingGoat
60+
env:
61+
KENTICO_LICENSE_FILE: ${{ secrets['KENTICO_LICENSE_FILE'] }}
5962
run: |
60-
dotnet test `
61-
--configuration Release `
62-
--no-build `
63-
--no-restore
63+
if [ -z "$KENTICO_LICENSE_FILE" ]; then
64+
echo "Missing KENTICO_LICENSE_FILE secret."
65+
exit 1
66+
fi
67+
68+
license_file="$(mktemp)"
69+
trap 'rm -f "$license_file"' EXIT
70+
printf '%s' "$KENTICO_LICENSE_FILE" > "$license_file"
71+
72+
dotnet kentico-xperience-dbmanager -- \
73+
-s "$SQL_SERVER_HOST" \
74+
-u "sa" \
75+
-p "$SQL_SERVER_SA_PASSWORD" \
76+
-a "$SQL_SERVER_SA_PASSWORD" \
77+
-d "$SQL_SERVER_DATABASE" \
78+
--license-file "$license_file" \
79+
--recreate-existing-database
80+
- name: Install dependencies
81+
run: npm ci
82+
- name: Install Playwright Browsers
83+
run: npx playwright install --with-deps
84+
- name: Run Playwright tests
85+
run: npx playwright test
86+
- uses: actions/upload-artifact@v7
87+
if: ${{ !cancelled() }}
88+
with:
89+
name: playwright-report
90+
path: tests/playwright-report/
91+
retention-days: 30

.vscode/mcp.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"servers": {
3+
"kentico.docs.mcp": {
4+
"type": "http",
5+
"url": "https://docs.kentico.com/mcp"
6+
},
7+
"dancing-goat": {
8+
"type": "http",
9+
"url": "http://localhost:44985/mcp"
10+
},
11+
"io.github.ChromeDevTools/chrome-devtools-mcp": {
12+
"type": "stdio",
13+
"command": "npx",
14+
"args": [
15+
"--registry",
16+
"https://registry.npmjs.org",
17+
"chrome-devtools-mcp@latest",
18+
"--no-usage-statistics"
19+
]
20+
}
21+
},
22+
"inputs": []
23+
}

.vscode/settings.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,8 @@
3131
"editor.defaultFormatter": "ms-dotnettools.csharp"
3232
},
3333

34-
"dotnet.defaultSolution": "Kentico.Xperience.RepoTemplate.slnx",
35-
"dotnet.solution.autoOpen": "Kentico.Xperience.RepoTemplate.slnx",
36-
37-
"eslint.workingDirectories": [
38-
"./src/Kentico.Xperience.RepoTemplate.Admin/Client"
39-
],
34+
"dotnet.defaultSolution": "DancingGoat.slnx",
35+
"dotnet.solution.autoOpen": "DancingGoat.slnx",
4036

4137
"files.associations": {
4238
".azuredevops/**/*.yml": "azure-pipelines"

0 commit comments

Comments
 (0)