-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/ssi-dk/AEF-DDF
- Loading branch information
Showing
1 changed file
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,7 +215,7 @@ jobs: | |
"MSSQL": { | ||
"driver": "ODBC Driver 17 for SQL Server", | ||
"server": "localhost", | ||
"database": "tempdb", | ||
"database": "master", | ||
"UID": "SA", | ||
"PWD": "dbatools.I0" | ||
} | ||
|
@@ -226,21 +226,25 @@ jobs: | |
uses: potatoqualitee/[email protected] | ||
with: | ||
install: sqlengine, sqlpackage, sqlclient | ||
show-log: true | ||
|
||
- name: Setup testing schemata in SQL server | ||
if: ${{ inputs.schemas != 'none' }} | ||
run: | | ||
set -o xtrace | ||
sqlcmd -V 10 -S localhost -U SA -P dbatools.I0 -Q "ALTER LOGIN SA WITH DEFAULT_DATABASE = master;" | ||
IFS=',' read -ra schemas <<< "${{ inputs.schemas }}" | ||
for schema in "${schemas[@]}"; do | ||
sqlcmd -V 10 -S localhost -U SA -P dbatools.I0 -d tempdb -Q "CREATE SCHEMA [$schema];" | ||
sqlcmd -V 10 -S localhost -U SA -P dbatools.I0 -d tempdb -Q "GO" | ||
sqlcmd -V 10 -S localhost -U SA -P dbatools.I0 -d master -Q "CREATE SCHEMA [$schema];" | ||
sqlcmd -V 10 -S localhost -U SA -P dbatools.I0 -d master -Q "GO" | ||
done | ||
sqlcmd -V 10 -S localhost -U SA -P dbatools.I0 -d tempdb -Q "SELECT * FROM sys.schemas" | ||
sqlcmd -V 10 -S localhost -U SA -P dbatools.I0 -d master -Q "SELECT * FROM sys.schemas" | ||
sqlcmd -V 10 -S localhost -U SA -P dbatools.I0 -d tempdb -Q "SELECT schema_name FROM INFORMATION_SCHEMA.SCHEMATA WHERE schema_name = 'test'" | ||
sqlcmd -V 10 -S localhost -U SA -P dbatools.I0 -d tempdb -Q "SELECT schema_name FROM INFORMATION_SCHEMA.SCHEMATA WHERE schema_name = 'test.one'" | ||
sqlcmd -V 10 -S localhost -U SA -P dbatools.I0 -d master -Q "SELECT schema_name FROM INFORMATION_SCHEMA.SCHEMATA WHERE schema_name = 'test'" | ||
sqlcmd -V 10 -S localhost -U SA -P dbatools.I0 -d master -Q "SELECT schema_name FROM INFORMATION_SCHEMA.SCHEMATA WHERE schema_name = 'test.one'" | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -282,3 +286,17 @@ jobs: | |
with: | ||
name: coverage-test-failures-mssql | ||
path: ${{ runner.temp }}/package | ||
|
||
- name: Collect docker logs | ||
if: always() | ||
uses: jwalton/gh-docker-logs@v1 | ||
with: | ||
dest: '${{ runner.workspace }}/logs-docker' | ||
|
||
- name: Check docker logs for SQL Server ERRORs | ||
if: always() | ||
run: | | ||
## -------------------------------------------------------------------- | ||
log=$(find ${{ runner.workspace }}/logs-docker/ -name 'sql.log') | ||
cat "$log" |