Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/ssi-dk/AEF-DDF
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusSkytte committed Feb 13, 2024
2 parents cbaa23e + c65d2a7 commit 1ee9b91
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/code-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ jobs:
"MSSQL": {
"driver": "ODBC Driver 17 for SQL Server",
"server": "localhost",
"database": "tempdb",
"database": "master",
"UID": "SA",
"PWD": "dbatools.I0"
}
Expand All @@ -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

Expand Down Expand Up @@ -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"

0 comments on commit 1ee9b91

Please sign in to comment.