Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use Choco for SQLLocalDB install #1138

Merged
merged 4 commits into from
Apr 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,15 @@ jobs:
set -euxo pipefail
rdmp_cli_ver=$(grep -F -m1 HIC.RDMP.Plugin src/common/Smi.Common/Smi.Common.csproj | sed -n 's/.*Version="\([0-9.]*\)".*/\1/p')
echo "rdmp_cli_ver=v$rdmp_cli_ver" >> $GITHUB_ENV
# Ref: https://github.com/actions/virtual-environments/issues/1282#issuecomment-668686268
- name: "[windows] install SQL 2019 localdb"
- name: "[windows] Install SQL LocalDB"
if: ${{ matrix.os == 'windows' }}
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install sqllocaldb
- name: "[windows] Check SQL LocalDB and set rdmp_conn_str"
if: ${{ matrix.os == 'windows' }}
shell: pwsh
run: |
Write-Host "Downloading"
Import-Module BitsTransfer
Start-BitsTransfer -Source https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SqlLocalDB.msi -Destination SqlLocalDB.msi
Write-Host "Installing"
Start-Process -FilePath "SqlLocalDB.msi" -Wait -ArgumentList "/qn", "/norestart", "/l*v SqlLocalDBInstall.log", "IACCEPTSQLLOCALDBLICENSETERMS=YES";
Write-Host "Checking"
$db = "(localdb)\MSSQLLocalDB"
sqlcmd -l 180 -S "$db" -Q "SELECT @@VERSION;"
Expand Down
1 change: 1 addition & 0 deletions news/1138-bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use Chocolatey to install SQL 2019 LocalDB instead of Powershell script