https://github.com/lowlydba/tsqlt-installer
🔵 Github Action to install tSQLt.
https://github.com/lowlydba/tsqlt-installer
github-actions github-actions-ci mssql sqlserver tsqlt unit-testing
Last synced: 2 months ago
JSON representation
🔵 Github Action to install tSQLt.
- Host: GitHub
- URL: https://github.com/lowlydba/tsqlt-installer
- Owner: lowlydba
- License: mit
- Created: 2022-05-29T20:11:21.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-12T01:37:43.000Z (over 1 year ago)
- Last Synced: 2024-09-16T11:41:36.432Z (8 months ago)
- Topics: github-actions, github-actions-ci, mssql, sqlserver, tsqlt, unit-testing
- Language: PowerShell
- Homepage:
- Size: 33.2 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# tSQLt Installer Action
[](https://github.com/lowlydba/tsqlt-installer/actions/workflows/windows.yml)
[](https://github.com/lowlydba/tsqlt-installer/actions/workflows/linux.yml)
[](https://github.com/lowlydba/tsqlt-installer/actions/workflows/azuresql.yml)
[](https://github.com/lowlydba/tsqlt-installer/actions/workflows/linter.yml)## Description
A Github Action to install [tSQLt](https://github.com/tSQLt-org/tSQLt) on SQL Server and AzureSQL databases for unit testing.
Pull requests are welcome!
## Action Type
Composite
## Author
[@lowlydba](https://github.com/lowlydba)
## Inputs
* `sql-instance`:
*Description*: Target SQL instance.
*Default*: `localhost`
* `database`:
*Description*: Target database to install to.
*Default*: `master`
* `user`:
*Description*: Optional user for SQL authentication.
* `password`:
*Description*: Optional password for SQL authentication.
* `version`:
*Description*: Version to install.
*Default*: `latest`
* `create-database`:
*Description*: Create database if it doesn't exist.
*Default*: `false`
* `update`:
*Description*: Uninstalls and reinstalls if tSQLt is already present.
*Default*: `false`
## Example Workflows
To install using Windows authentication:
```yml
on: [push]jobs:
windows-auth-tsqlt:
name: Test installting tSQLt with Windows auth
runs-on: windows-lateststeps:
- uses: actions/checkout@v2- name: Install SQL Server
uses: potatoqualitee/[email protected]
with:
install: sqlengine- name: Install tSQLt with Windows auth
uses: lowlydba/tsqlt-installer@v1
with:
sql-instance: localhost
database: master
version: latest
```To install using SQL authentication:
```yml
on: [push]jobs:
sql-auth-tsqlt:
name: Test installting tSQLt with SQL auth
runs-on: ubuntu-latest
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- 1433:1433
env:
ACCEPT_EULA: Y
SA_PASSWORD: verystrongindeedsteps:
- uses: actions/checkout@v2- name: Install tSQLt with SQL auth
uses: lowlydba/tsqlt-installer@v1
with:
sql-instance: localhost
database: master
version: latest
user: sa
password: verystrongindeed
```## Notes
* Any invalid version strings are equal to `latest`
* Known version strings:
* `1-0-5873-27393` - For SQL 2005 and Azure SQL.
* Ensure firewall exceptions are in place for Azure SQL targets.