Skip to content

Commit

Permalink
Merge branch 'feat/automatic_E2E_testing' of https://github.com/Kenti…
Browse files Browse the repository at this point in the history
…co/xperience-by-kentico-shopify into feat/automatic_E2E_testing
  • Loading branch information
andrejrblue committed Nov 21, 2024
2 parents c8e2b67 + 8d623d5 commit 6bc0596
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
CMSSHOPIFYCONFIG__STOREFRONTAPIKEY: ${{ secrets.STOREFRONT_API_KEY }}
CMSSHOPIFYCONFIG__STOREFRONTAPIVERSION: ${{ secrets.STOREFRONT_API_VERSION }}
CMSSHOPIFYCONFIG__STOREPASSWORD: ${{ secrets.SHOPIFY_STORE_PASSWORD }}
XPERIENCE_BY_KENTICO_LICENSE: eyJEYXRhIjoie1x1MDAyMnRpZXJcdTAwMjI6XHUwMDIyQWR2YW5jZWRcdTAwMjIsXHUwMDIybGljZW5zZVx1MDAyMjpudWxsLFx1MDAyMmxpbWl0YXRpb25zXHUwMDIyOntcdTAwMjJjaGFubmVsc1x1MDAyMjo1LFx1MDAyMm1pY3JvQ2hhbm5lbHNcdTAwMjI6NX0sXHUwMDIya2V5XHUwMDIyOntcdTAwMjJpZFx1MDAyMjpcdTAwMjJlZjdmZTczZC1mNzI4LTQzOTYtOTQ3MS0yZGFhOTlkM2NlOWZcdTAwMjIsXHUwMDIydmVyc2lvblx1MDAyMjpcdTAwMjIxXHUwMDIyLFx1MDAyMmlzc3VlZERhdGVVdGNcdTAwMjI6XHUwMDIyMjAyNC0xMC0yMVQxMjoxMzo1My42NDA3NDczWlx1MDAyMixcdTAwMjJleHBpcmF0aW9uRGF0ZVV0Y1x1MDAyMjpcdTAwMjIyMDI1LTEwLTIwVDEyOjExOjAwWlx1MDAyMixcdTAwMjJ0eXBlXHUwMDIyOlx1MDAyMkRldmVsb3BtZW50XHUwMDIyLFx1MDAyMm5hbWVcdTAwMjI6XHUwMDIyS0VOVElDT19HSF9hY3Rpb25zXHUwMDIyLFx1MDAyMnN5bmNocm9uaXphdGlvblx1MDAyMjp0cnVlfX0iLCJTaWduYXR1cmUiOiJKRlhieTEwSjlTeDR6ZWFjZzR1YldSS3BSMldsOWlJXHUwMDJCWVZ2ZXNnN1BSeEE0ZGhIbXk3XHUwMDJCaXVtbk1JRXpKZmpQWGU1bC9cdTAwMkJMbjFOcXZTcVBDY0NaWjdaM1M1OFVKd3ZoWVdqVzI4ckRFL3FNaVNIM1M4V2lPYXd4anVUZ1Y2UmlaZDNNemloTEFFMFkxR1JUbDRodFlLOUFUZEpmQXk4NXFcdTAwMkJnVmJZaGpzc3dSaWttNzcwVm1jVWEvLzZSOFlYQ3hRMVJBTkZ4OU1sZlQxeVpQckl3UkhcdTAwMkJNaEFsUGN2b1RiTHNpNTRURW5LcTVSOTlIVGNTRkJcdTAwMkJ3VnBkNGF0bFRoVjZVM1hLQXV4Z2g4YjRcdTAwMkJiRnZ0L1o3UnFUZUY1bVx1MDAyQkJPdnFocWZyd1J4VnBER1dYaVQ4aXNTdjRpbTVXbjBHWXFmR3JHSXdcdTAwMkJOU3k5aW92NEw4VlVPOWM3cFE9PSJ9

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -79,7 +80,6 @@ jobs:
run: |
dotnet build `
--configuration Release `
--no-restore `
-p:XbyKVersion=*
- name: Get Database Backup Name
Expand All @@ -100,7 +100,6 @@ jobs:
version: 2022

- name: Restore Database .bak
# TODO: Heslo v otevřené podobě?
run: |
docker exec sql mkdir /var/opt/mssql/backup
docker cp "./database/${{ env.DATABASE_BACKUP_FILENAME }}" sql:/var/opt/mssql/backup
Expand All @@ -112,17 +111,14 @@ jobs:
-Q "RESTORE DATABASE [${{env.DB_NAME}}] FROM DISK='/var/opt/mssql/backup/${{ env.DATABASE_BACKUP_FILENAME }}' WITH MOVE 'XByK_DancingGoat_Shopify' TO '/var/opt/mssql/data/${{env.DB_NAME}}.mdf', MOVE 'XByK_DancingGoat_Shopify_log' TO '/var/opt/mssql/data/${{env.DB_NAME}}_log.ldf'"
if: endsWith(env.DATABASE_BACKUP_FILENAME, '.bak')

- name: Restore Database .bacpac
- name: Import license key to DB
run: |
sqlpackage `
/a:Import `
/tsn:localhost `
/tdn:${{env.DB_NAME}} `
/tu:sa `
/tp:Pass@12345 `
/sf:"./database/${{ env.DATABASE_BACKUP_FILENAME }}" `
/tec:False
if: endsWith(env.DATABASE_BACKUP_FILENAME, '.bacpac')
sqlcmd `
-S localhost `
-d ${{env.DB_NAME}} `
-U "sa" `
-P "Pass@12345" `
-Q "UPDATE CMS_SettingsKey SET KeyValue='${{ env.XPERIENCE_BY_KENTICO_LICENSE }}' WHERE KeyName='CMSLicenseKey'"
- name: Restore CI Repository
working-directory: "./scripts"
Expand Down Expand Up @@ -197,6 +193,7 @@ jobs:
Remove-Job -Name ${{ env.PROJECT_NAME }}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: ./test/Playwright/playwright-report/
Expand Down
Binary file modified database/XByK_DancingGoat_Shopify.bak.zip
Binary file not shown.

0 comments on commit 6bc0596

Please sign in to comment.