Closed astaric closed 5 years ago
These guys have managed to run mssql on travis:
https://github.com/aspnet/EntityFrameworkCore/pull/7842/files
@robertcv, @lanzagar, I don't know what exactly were you merging today, but can we now close this issue?
Yes, mssql testing was added in #3515.
@lanzagar @robertcv : This is not documented in "Setting up Databases": https://docs.travis-ci.com/user/database-setup/ How does it work for SQL Server? Please document this important feature.
Travis doesn't support SQL Server as a service. The above links refer to installing SQL Server on Linux. We opted for an even better solution and used docker (see commit ea8205a20acd6a74dfd7c829abed7f0bd00c7184 and SQL Server documentation).
This is how we got docker sqlserver linux to work with travis, put in file .travis.yaml
:
before_script:
- sudo docker run --name=mssql-server-linux-latest -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=YourStrong!Passw0rd' -p 1433:1433 -d microsoft/mssql-server-linux:2017-latest
- sudo docker cp sqlserver.sql mssql-server-linux-latest:sqlserver.sql
- sudo docker exec -it mssql-server-linux-latest /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'YourStrong!Passw0rd' -i sqlserver.sql
create file sqlserver.sql
and put your sql to run when the container is ready.
Since mssql server became installable on linux, testing should be possible (in theory at least).
https://www.tecmint.com/install-ms-sql-server-centos-ubuntu-linux/