Skip to content

Commit 47f52a7

Browse files
committed
Add CI workflow to run test suite on push to test_dll_issue branch
1 parent 2587bb3 commit 47f52a7

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/run_tests.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,28 @@ jobs:
6060
DB2_HOSTNAME: ${{ secrets.DB2_HOSTNAME }}
6161
DB2_PORT: ${{ secrets.DB2_PORT }}
6262
run: |
63+
Write-Host "Checking secrets are set..."
64+
Write-Host "DB2_DATABASE is set: $([bool]$env:DB2_DATABASE)"
65+
Write-Host "DB2_HOSTNAME is set: $([bool]$env:DB2_HOSTNAME)"
66+
Write-Host "DB2_PORT is set: $([bool]$env:DB2_PORT)"
67+
Write-Host "DB2_USER is set: $([bool]$env:DB2_USER)"
68+
Write-Host "DB2_PASSWD is set: $([bool]$env:DB2_PASSWD)"
69+
if (-not $env:DB2_DATABASE) {
70+
Write-Error "DB2_DATABASE secret is not set! Go to repo Settings > Secrets > Actions and add it."
71+
exit 1
72+
}
6373
Copy-Item config.py.sample config.py
74+
$port = if ($env:DB2_PORT) { [int]$env:DB2_PORT } else { 50000 }
6475
$json = @{
6576
database = $env:DB2_DATABASE
6677
user = $env:DB2_USER
6778
password = $env:DB2_PASSWD
6879
hostname = $env:DB2_HOSTNAME
69-
port = [int]$env:DB2_PORT
80+
port = $port
7081
} | ConvertTo-Json
7182
$json | Set-Content -Path config.json -Encoding UTF8
72-
Write-Host "config.json created"
83+
Write-Host "config.json created:"
84+
Get-Content config.json
7385
7486
- name: Write db2dsdriver.cfg into clidriver/cfg
7587
shell: powershell

0 commit comments

Comments
 (0)