Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Medek authored and Martin Medek committed Oct 17, 2024
1 parent f02dbf1 commit 56ff1a7
Showing 1 changed file with 23 additions and 38 deletions.
61 changes: 23 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "CI: Build and Test"

on:
push:
branches: [main]
branches: [main, feat/github-actions-pipeline]
paths:
- "**.cs"
- "**.cshtml"
Expand Down Expand Up @@ -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
Expand All @@ -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 "<hash_string_salt>" --license-file "<license_file_path>"
- 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
Expand Down

0 comments on commit 56ff1a7

Please sign in to comment.