Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
database

GitHub Action

tSQLt Installer

v1

tSQLt Installer

database

tSQLt Installer

Installs tSQLt

Installation

Copy and paste the following snippet into your .yml file.

              

- name: tSQLt Installer

uses: lowlydba/tsqlt-installer@v1

Learn more about this action in lowlydba/tsqlt-installer

Choose a version

tSQLt Installer Action

Windows Linux Lint

Description

A Github Action to install tSQLt on databases for unit testing.

Action Type

Composite

Author

@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:

    Description: Create database if it doesn't exist.

    Default: false

Example Workflows

To install using Windows authentication:

on: [push]

jobs:
  windows-auth-tsqlt:
    name: Test installting tSQLt with Windows auth
    runs-on: windows-latest

  steps:
    - uses: actions/checkout@v2

    - name: Install SQL Server
      uses: potatoqualitee/mssqlsuite@v1.4
      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:

on: [push]

jobs:
 windows-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: verystrongindeed

    steps:
      - 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.

Roadmap

Forthcoming:

  • AzureSQL support