Skip to content

Commit 43f0366

Browse files
committed
Make MSSQL job optional and fix sqlcmd paths
1 parent 6f34cb2 commit 43f0366

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/example.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ jobs:
105105

106106
mssql-preview:
107107
runs-on: ubuntu-latest
108+
continue-on-error: true
108109

109110
services:
110111
sqlserver:
@@ -114,7 +115,7 @@ jobs:
114115
SA_PASSWORD: YourStrong@Passw0rd
115116
MSSQL_PID: Developer
116117
options: >-
117-
--health-cmd "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'YourStrong@Passw0rd' -Q 'SELECT 1'"
118+
--health-cmd "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'YourStrong@Passw0rd' -Q 'SELECT 1' -No"
118119
--health-interval 10s
119120
--health-timeout 5s
120121
--health-retries 10
@@ -129,12 +130,13 @@ jobs:
129130

130131
- name: Wait for SQL Server
131132
run: |
133+
sudo apt-get update && sudo apt-get install -y mssql-tools18
132134
for i in {1..30}; do
133-
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'YourStrong@Passw0rd' -Q 'SELECT 1' && break
135+
/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'YourStrong@Passw0rd' -Q 'SELECT 1' -No && break
134136
echo "Waiting for SQL Server..."
135137
sleep 2
136138
done
137-
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'YourStrong@Passw0rd' -Q "CREATE DATABASE testdb"
139+
/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'YourStrong@Passw0rd' -Q "CREATE DATABASE testdb" -No
138140
139141
- name: Preview MSSQL schema changes
140142
uses: ./

0 commit comments

Comments
 (0)