Skip to content

Setup development environment

Rodel E. Dagumampan edited this page Nov 17, 2019 · 31 revisions

Prerequisites

Building the code

cd yuniql-cli
dotnet build

Publishing as self-contained application (win-x64)

cd yuniql-cli
dotnet publish -c release -r win-x64 /p:publishsinglefile=true /p:publishtrimmed=true

Publishing as self-contained application (linux-x64)

cd yuniql-cli
dotnet publish -c release -r linux-x64 /p:publishsinglefile=true /p:publishtrimmed=true

Running sqlserver-tests

The following tests assumes you have an environment variable YUNIQL_CONNECTION_STRING. If the env variable is not present, it will be default into Server=localhost,1400;Database={databaseName};User Id=SA;Password=P@ssw0rd! where the database name is replaced by each test case id.

cd yuniql-tests
dotnet build
dotnet test

You may also run the following commands to instantiate a containerized sql server

docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=P@ssw0rd!" -p 1400:1433 -d mcr.microsoft.com/mssql/server:2017-latest
SETX YUNIQL_CONNECTION_STRING "Server=localhost,1400;Database=HelloYuniqlDb;User Id=SA;Password=P@ssw0rd!"

Running sql-server tests with docker-compose

The following commands deploys a stack of two containers; db and test. It creates an SQL Server - Developer Edition on a linux container and creates a test container to run yuniql integration tests.

docker-compose down
docker-compose build --no-cache
docker-compose up

Found bugs?

Help us improve further please create an issue.