From 56ff1a7fd1219765d5380d888a8cd3ac86897a74 Mon Sep 17 00:00:00 2001 From: Martin Medek Date: Thu, 17 Oct 2024 18:26:50 +0200 Subject: [PATCH] test --- .github/workflows/ci.yml | 61 +++++++++++++++------------------------- 1 file changed, 23 insertions(+), 38 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5aa02ed..26496d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: "CI: Build and Test" on: push: - branches: [main] + branches: [main, feat/github-actions-pipeline] paths: - "**.cs" - "**.cshtml" @@ -45,23 +45,30 @@ jobs: --health-retries 5 steps: - - name: Checkout code - uses: actions/checkout@v3 + # - name: Install sqlcmd + # run: | + # sudo apt-get update + # sudo ACCEPT_EULA=y apt-get install -y mssql-tools unixodbc-dev + # echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc + # source ~/.bashrc - - name: Wait for SQL Server to be ready - run: | - for i in {1..30}; do - if /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -Q "SELECT 1" &> /dev/null; then - echo "SQL Server is up and running" - break - fi - echo "Waiting for SQL Server to be ready..." - sleep 2 - done + # - name: Wait for SQL Server to be ready + # run: | + # for i in {1..30}; do + # if /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -Q "SELECT 1" &> /dev/null; then + # echo "SQL Server is up and running" + # break + # fi + # echo "Waiting for SQL Server to be ready..." + # sleep 2 + # done - - name: Print SQL Server name - run: | - /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -Q "SELECT @@SERVERNAME" + # - name: Print SQL Server name + # run: | + # /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -Q "SELECT @@SERVERNAME" + + - name: Checkout code + uses: actions/checkout@v3 - name: Setup .NET uses: actions/setup-dotnet@v3 @@ -79,28 +86,6 @@ jobs: --configuration Release ` --no-restore - - name: Get kentico template - run: | - dotnet new -i Kentico.Xperience.Templates - - - name: Create Kentico Xperience project - run: | - dotnet new kentico-boilerplate -n kentico-boilerplate - - - name: Tool restore - run: | - dotnet tool restore - - - name: Create Kentico database - run: | - dotnet kentico-xperience-dbmanager -- -s "localhost" -d "pwtest" -u sa -p $SA_PASSWORD -a "admin" --hash-string-salt "" --license-file "" - - - name: Run Kentico Xperience project - run: | - dotnet run - -# TODO how to get licence file - ####### The only tests present are now Playwright NUnit tests, ####### which aren't properly integrated into this pipeline # - name: Test Solution