-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.3 KB
/
sqlserver_2017_ubuntu_20.04.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: sqlserver_2017_ubuntu_20.04
on:
push:
branches: # Change branches as per your requirement.
- main
jobs:
sqlserver:
env:
TZ: Asia/Kolkata
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: YourPasswordHereOrFromSecrets123
USERNAME: sa
HOST: localhost
runs-on: ubuntu-20.04
services:
mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
ports:
- 1433:1433
env:
TZ: ${{ env.TZ }}
ACCEPT_EULA: ${{ env.ACCEPT_EULA }}
MSSQL_SA_PASSWORD: ${{ env.MSSQL_SA_PASSWORD }}
USERNAME: ${{ env.USERNAME }}
HOST: ${{ env.HOST }}
options: >-
--health-cmd="/opt/mssql-tools/bin/sqlcmd -S ${HOST} -U ${USERNAME} -P ${MSSQL_SA_PASSWORD} -N -C -l 30 -Q 'SELECT 1' || exit 1"
--health-start-period 10s
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- name: Run sample query
env:
TZ: ${{ env.TZ }}
ACCEPT_EULA: ${{ env.ACCEPT_EULA }}
MSSQL_SA_PASSWORD: ${{ env.MSSQL_SA_PASSWORD }}
USERNAME: ${{ env.USERNAME }}
HOST: ${{ env.HOST }}
run: |
/opt/mssql-tools/bin/sqlcmd -S ${HOST} -U ${USERNAME} -P ${MSSQL_SA_PASSWORD} -N -C -l 30 -Q 'SELECT @@VERSION AS VERSION'