Skip to content

Commit

Permalink
fix(code-coverage): Correctly set up testing schema
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusSkytte committed Feb 27, 2024
1 parent d8dfacf commit ac1c02c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/code-coverage-v0.3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,9 @@ jobs:

steps:
- name: Setup testing schemata in PostgreSQL
if: ${{ inputs.schemas != 'none' }}
run: |
set -o xtrace
IFS=',' read -ra schemas <<< "${{ inputs.schemas }}"
IFS=',' read -ra schemas <<< "test_ds,not_test_ds"
for schema in "${schemas[@]}"; do
psql test -c "CREATE SCHEMA \"$schema\";"
done
Expand Down Expand Up @@ -222,13 +221,12 @@ jobs:
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 }}"
IFS=',' read -ra schemas <<< "test_ds,not_test_ds"
for schema in "${schemas[@]}"; do
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"
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/code-coverage-v0.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,9 @@ jobs:

steps:
- name: Setup testing schemata in PostgreSQL
if: ${{ inputs.schemas != 'none' }}
run: |
set -o xtrace
IFS=',' read -ra schemas <<< "${{ inputs.schemas }}"
IFS=',' read -ra schemas <<< "test_ds,not_test_ds"
for schema in "${schemas[@]}"; do
psql test -c "CREATE SCHEMA \"$schema\";"
done
Expand Down Expand Up @@ -303,13 +302,12 @@ jobs:
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 }}"
IFS=',' read -ra schemas <<< "test_ds,not_test_ds"
for schema in "${schemas[@]}"; do
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"
Expand Down

0 comments on commit ac1c02c

Please sign in to comment.