95
95
branches: [ "master" ]
96
96
pull_request:
97
97
branches: [ "master" ]
98
-
98
+
99
99
# Allows you to run this workflow manually from the Actions tab
100
100
workflow_dispatch:
101
101
```
@@ -112,8 +112,11 @@ The following YAML code snippet sets up the SQL Server service.
112
112
113
113
```
114
114
jobs:
115
+
115
116
windows-auth-tsqlt:
116
- name: Installting tSQLt with SQL Auth
117
+
118
+ name: Installting tSQLt framework with SQL Auth and running unit tests
119
+
117
120
# The type of runner that the job will run on
118
121
runs-on: ubuntu-latest
119
122
@@ -153,7 +156,7 @@ The snippet of YAML code used for the installation of the tSQLt framework in the
153
156
154
157
```
155
158
steps:
156
- - uses: actions/checkout@v2
159
+ - uses: actions/checkout@v3.5.2
157
160
- name: Install tSQLt with SQL auth on AdventureWorks2017
158
161
uses: lowlydba/tsqlt-installer@v1
159
162
with:
@@ -177,8 +180,9 @@ Triggers and stored procedures are created in the AdventureWorks database attach
177
180
```
178
181
- name: Create sp usp_Raiserror_SafetyStockLevel
179
182
run: docker exec -i $ENV_CONTAINER_ID /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "3uuiCaKxfbForrK" -d AdventureWorks2017 -b < ./source/usp-raiserror-safetystocklevel.sql
180
- - name: Create TR_Product_SafetyStockLevel
181
- run: docker exec -i $ENV_CONTAINER_ID /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "3uuiCaKxfbForrK" -d AdventureWorks2017 -b < ./source/tr_product_safetystocklevel.sql
183
+
184
+ - name: Create system under test (SUT) TR_Product_SafetyStockLevel
185
+ run: docker exec -i $ENV_CONTAINER_ID /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "3uuiCaKxfbForrK" -d AdventureWorks2017 -b < ./source/tr-product-safetystocklevel.sql
182
186
```
183
187
184
188
** 6. Creation and execution of test units**
@@ -203,10 +207,13 @@ The following snippet of YAML code creates and runs the test units.
203
207
```
204
208
- name: Create and run test case try to insert one wrong row
205
209
run: docker exec -i $ENV_CONTAINER_ID /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "3uuiCaKxfbForrK" -d AdventureWorks2017 -b < ./unit-test/test-case-try-to-insert-one-wrong-row.sql
210
+
206
211
- name: Create and run test case try to insert one right row
207
212
run: docker exec -i $ENV_CONTAINER_ID /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "3uuiCaKxfbForrK" -d AdventureWorks2017 -b < ./unit-test/test-case-try-to-insert-one-right-row.sql
213
+
208
214
- name: Create and run test case try to insert multiple rows
209
215
run: docker exec -i $ENV_CONTAINER_ID /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "3uuiCaKxfbForrK" -d AdventureWorks2017 -b < ./unit-test/test-case-try-to-insert-multiple-rows.sql
216
+
210
217
- name: Create and run test case try to insert multiple rows ordered
211
218
run: docker exec -i $ENV_CONTAINER_ID /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "3uuiCaKxfbForrK" -d AdventureWorks2017 -b < ./unit-test/test-case-try-to-insert-multiple-rows-ordered.sql
212
219
```
0 commit comments