Home

Awesome

setup-sqlserver

The missing action for SQL Server :tada:

Build Status

Getting Started

Add it as a step to your workflow

      - uses: ankane/setup-sqlserver@v1
        with:
          accept-eula: true

accept-eula confirms your acceptance of the End-User Licensing Agreement

Versions

Specify a version

      - uses: ankane/setup-sqlserver@v1
        with:
          accept-eula: true
          sqlserver-version: 2019

Currently supports

Version20222019
ubuntu-24.04
ubuntu-22.04default
ubuntu-20.04default
windows-2022default
windows-2019default

Test against multiple versions

    strategy:
      matrix:
        sqlserver-version: [2022, 2019]
    steps:
      - uses: ankane/setup-sqlserver@v1
        with:
          accept-eula: true
          sqlserver-version: ${{ matrix.sqlserver-version }}

Extra Steps

Create a database

      - run: sqlcmd -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE testdb'

Run queries

      - run: sqlcmd -U SA -P 'YourStrong!Passw0rd' -d testdb -Q 'SELECT @@VERSION'

Related Actions

Resources

Linux

Windows

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help: