@@ -35,20 +35,30 @@ jobs:
3535 integration :
3636 runs-on : ${{ matrix.os }}
3737 name : sqlserver-${{ matrix.sql_server }} x ${{ matrix.os }}
38+ defaults :
39+ run :
40+ shell : pwsh
3841 strategy :
3942 fail-fast : false
4043 matrix :
4144 os :
4245 - windows-latest
4346 sql_server :
4447 - 2019
48+ - 2017
4549
4650 steps :
4751 - name : Check out code
48524953 with :
5054 path : " "
5155 ref : ${{ github.head_ref }}
56+
57+ # - name: Install and cache PowerShell modules
58+ # uses: potatoqualitee/[email protected] 59+ # with:
60+ # modules-to-cache: dbatools
61+ # shell: powershell
5262
5363 - name : Install SQL Server
5464 continue-on-error : true
5767 with :
5868 install : sqlengine
5969 sa-password : L0wlydb4
70+ version : ${{ matrix.sql_server }}
6071
6172 - name : Retry SQL Server install
6273 if : steps.mssqlsuite.outcome == 'failure'
@@ -65,24 +76,18 @@ jobs:
6576 install : sqlengine
6677 sa-password : L0wlydb4
6778
68- - name : Install and cache PowerShell modules
69- uses :
potatoqualitee/[email protected] 70- with :
71- modules-to-cache : dbatools
72- shell : powershell
73-
7479 - name : Install tSQLt
7580 uses : lowlydba/tsqlt-installer@v1
7681 with :
7782 sql-instance : ${{ env.SQLINSTANCE }}
7883 database : ${{ env.DATABASE }}
7984 version : " latest"
8085 create : true
81-
86+
8287 - name : Install multitool
8388 run : |
8489 foreach ($script in (Get-ChildItem -Path "." -Filter "sp_*.sql").Name) {
85- Invoke-DbaQuery -SqlInstance $Env:SQLINSTANCE -Database $Env:DATABASE -File $script -EnableException
90+ Invoke-Sqlcmd -ServerInstance $Env:SQLINSTANCE -Database $Env:DATABASE -InputFile $script
8691 }
8792
8893 - name : Run Pester tests with SQLCover
@@ -103,7 +108,7 @@ jobs:
103108 run : |
104109 Write-Output "Generating '$Env:SAMPLE_DATABASE' markdown sample."
105110 $Query = "EXEC sp_doc @DatabaseName = '$Env:SAMPLE_DATABASE';"
106- Invoke-DbaQuery -SqlInstance $Env:SQLINSTANCE -Database $Env:DATABASE -Query $Query -As SingleValue -EnableException | Out-File "$($Env:SAMPLE_DATABASE)-$($Env:SQL_VERSION).md"
111+ Invoke-SqlCmd -ServerInstance $Env:SQLINSTANCE -Database $Env:DATABASE -Query $Query -As DataRows | Select-Object -ExpandProperty 'value' | Out-File "$($Env:SAMPLE_DATABASE)-$($Env:SQL_VERSION).md"
107112
108113 - name : Upload sp_doc sample artifact
109114 uses : actions/upload-artifact@v3
0 commit comments