Skip to content

Commit

Permalink
fixing review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Medek authored and Martin Medek committed Dec 19, 2024
1 parent edfc60c commit 1d8b1d1
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ env:
XBK_DIR: "${{ github.workspace }}\\xbk"
UMT_DIR: "${{ github.workspace }}\\umt"
DB_USER: "kentico"
DB_PASSWORD: "Asdfg12345!@#$%"
DB_DATABASE: "pwtest"
XBK_ADMIN_PASSWORD: "admin"
LICENSE_FILE: "${{ github.workspace }}\\license.txt"
XBK_URL: ""
SQLSERVER_NAME: ".\\SQLEXPRESS"
Expand All @@ -58,6 +56,7 @@ jobs:
run: |
dotnet restore --locked-mode
dotnet tool restore
dotnet build
- name: <DB> Install SQL Server
uses: Particular/install-sql-server-action@v1.0.0
Expand All @@ -67,7 +66,7 @@ jobs:

- name: <DB> Create Kentico DB user
run: |
sqlcmd -Q "CREATE LOGIN ${{ env.DB_USER}} WITH PASSWORD = '${{ env.DB_PASSWORD }}';
sqlcmd -Q "CREATE LOGIN ${{ env.DB_USER}} WITH PASSWORD = '${{ secrets.XPERIENCE_BY_KENTICO_DB_PASSWORD }}';
CREATE USER kentico FOR LOGIN kentico;
GO"
Expand All @@ -83,13 +82,9 @@ jobs:
Write-Output "SQL Server: Forcing Restart of Instance."
Restart-Service -Force 'MSSQL$SQLEXPRESS'
- name: <DB> Create database with collation Latin1_General_CI_AS
run: |
sqlcmd -S "${{ env.SQLSERVER_NAME}}" -U '${{ env.DB_USER}}' -P '${{ env.DB_PASSWORD }}' -Q "CREATE DATABASE ${{ env.DB_DATABASE}} COLLATE Latin1_General_CI_AS;"
- name: <DB> Test SQL Server login as admin
- name: <DB> Create database
run: |
sqlcmd -S "${{ env.SQLSERVER_NAME}}" -U '${{ env.DB_USER}}' -P '${{ env.DB_PASSWORD }}' -Q "SELECT 'Login successful' AS Message"
sqlcmd -S "${{ env.SQLSERVER_NAME}}" -U '${{ env.DB_USER}}' -P '${{ secrets.XPERIENCE_BY_KENTICO_DB_PASSWORD }}' -Q "CREATE DATABASE ${{ env.DB_DATABASE}} COLLATE Latin1_General_CI_AS;"
- name: <XbK> Install kentico templates
working-directory: ${{ env.UMT_DIR }}
Expand All @@ -109,8 +104,8 @@ jobs:
run: |
echo ${{ secrets.XPERIENCE_BY_KENTICO_LICENSE }} > ${{ env.LICENSE_FILE }}
Write-Output "SQL_SERVER_CONNECTION_STRING: $env:SQL_SERVER_CONNECTION_STRING"
dotnet kentico-xperience-dbmanager -- -s "${{ env.SQLSERVER_NAME}}" -d "${{ env.DB_DATABASE }}" -u "${{ env.DB_USER }}" -p "${{ env.DB_PASSWORD }}" -a "${{ env.XBK_ADMIN_PASSWORD }}" --license-file "${{ env.LICENSE_FILE }}" --use-existing-database --hash-string-salt "<hash_string_salt>"
sqlcmd -S "${{ env.SQLSERVER_NAME}}" -U 'kentico' -P '${{ env.DB_PASSWORD }}' -d "${{ env.DB_DATABASE }}" -Q "SELECT * FROM CMS_User"
dotnet kentico-xperience-dbmanager -- -s "${{ env.SQLSERVER_NAME}}" -d "${{ env.DB_DATABASE }}" -u "${{ env.DB_USER }}" -p "${{ secrets.XPERIENCE_BY_KENTICO_DB_PASSWORD }}" -a "${{ secrets.XPERIENCE_BY_KENTICO_ADMIN_PASSWORD }}" --license-file "${{ env.LICENSE_FILE }}" --use-existing-database --hash-string-salt "<hash_string_salt>"
sqlcmd -S "${{ env.SQLSERVER_NAME}}" -U 'kentico' -P '${{ secrets.XPERIENCE_BY_KENTICO_DB_PASSWORD }}' -d "${{ env.DB_DATABASE }}" -Q "SELECT * FROM CMS_User"
- name: <UMT> Prepare appsettings.json for migration
working-directory: ${{ env.UMT_DIR }}
Expand All @@ -127,12 +122,11 @@ jobs:
- name: <UMT> Run example migration
working-directory: ${{ env.UMT_DIR }}\examples\Kentico.Xperience.UMT.Example.Console\
run: |
dotnet run
dotnet run --no-build
- name: Install Playwright
working-directory: ${{ env.UMT_DIR }}\tests\Kentico.Xperience.UMT.Tests
run: |
dotnet build
bin\Debug\net8.0\playwright.ps1 install --with-deps
- name: Prepare test.runsettings
Expand All @@ -144,7 +138,7 @@ jobs:
Write-Output "Setting XbK URL for tests: $url"
(Get-Content test.runsettings) -replace "<BASE_URL>([^<]*)</BASE_URL>", "<BASE_URL>$url</BASE_URL>" | Set-Content test.runsettings
(Get-Content test.runsettings) -replace "<ADMINISTRATION_PASSWORD>([^<]*)</ADMINISTRATION_PASSWORD>", "<ADMINISTRATION_PASSWORD>${{ env.XBK_ADMIN_PASSWORD}}</ADMINISTRATION_PASSWORD>" | Set-Content test.runsettings
(Get-Content test.runsettings) -replace "<ADMINISTRATION_PASSWORD>([^<]*)</ADMINISTRATION_PASSWORD>", "<ADMINISTRATION_PASSWORD>${{ secrets.XPERIENCE_BY_KENTICO_ADMIN_PASSWORD }}</ADMINISTRATION_PASSWORD>" | Set-Content test.runsettings
Get-Content test.runsettings
- name: Start xbk and run tests
Expand Down

0 comments on commit 1d8b1d1

Please sign in to comment.