|
66 | 66 | docker-compose -f "test/docker-compose.linux.yml" up --detach
|
67 | 67 |
|
68 | 68 | - name: Set up CI configuration
|
69 |
| - run: | |
70 |
| - mkdir ~/.tedious |
71 |
| -
|
72 |
| - echo '{ |
73 |
| - "config": { |
74 |
| - "server": "localhost", |
75 |
| - "authentication": { |
76 |
| - "type": "default", |
77 |
| - "options": { |
78 |
| - "userName": "sa", |
79 |
| - "password": "yourStrong(!)Password" |
80 |
| - } |
81 |
| - }, |
82 |
| - "options": { |
83 |
| - "port": 1433, |
84 |
| - "database": "master", |
85 |
| - "encrypt": true |
86 |
| - } |
87 |
| - } |
88 |
| - }' | jq --arg certificate "$(cat ./test/fixtures/mssql.crt)" '.config.options.cryptoCredentialsDetails.ca |= $certificate' > ~/.tedious/test-connection.json |
| 69 | + shell: bash |
| 70 | + run: cp -f test/config.ci.ts test/config.ts |
89 | 71 |
|
90 | 72 | - name: Upgrade npm
|
91 | 73 | run: npm install -g npm
|
@@ -267,26 +249,7 @@ jobs:
|
267 | 249 |
|
268 | 250 | - name: Set up CI configuration
|
269 | 251 | shell: bash
|
270 |
| - run: | |
271 |
| - mkdir ~/.tedious |
272 |
| -
|
273 |
| - echo '{ |
274 |
| - "config": { |
275 |
| - "server": "localhost", |
276 |
| - "authentication": { |
277 |
| - "type": "default", |
278 |
| - "options": { |
279 |
| - "userName": "sa", |
280 |
| - "password": "yourStrong(!)Password" |
281 |
| - } |
282 |
| - }, |
283 |
| - "options": { |
284 |
| - "port": 1433, |
285 |
| - "database": "master", |
286 |
| - "trustServerCertificate": true |
287 |
| - } |
288 |
| - } |
289 |
| - }' | jq --arg certificate "$(cat ./test/fixtures/mssql.crt)" '.config.options.cryptoCredentialsDetails.ca |= $certificate' > ~/.tedious/test-connection.json |
| 252 | + run: cp -f test/config.ci.ts test/config.ts |
290 | 253 |
|
291 | 254 | - name: Upgrade npm
|
292 | 255 | run: npm install -g npm
|
@@ -383,29 +346,18 @@ jobs:
|
383 | 346 | key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
384 | 347 | restore-keys: |
|
385 | 348 | ${{ runner.os }}-node-
|
| 349 | +
|
386 | 350 | - run: npm ci
|
387 | 351 |
|
388 |
| - - run: mkdir ~/.tedious |
| 352 | + - name: Set up CI configuration |
| 353 | + shell: bash |
| 354 | + run: cp -f test/config.azure-default.ts test/config.ts |
389 | 355 |
|
390 |
| - - name: Set up CI configuration (SQL Authentication) |
391 |
| - run: | |
392 |
| - echo '{ |
393 |
| - "config": { |
394 |
| - "server": "${{ secrets.AZURE_SERVER }}", |
395 |
| - "authentication": { |
396 |
| - "type": "default", |
397 |
| - "options": { |
398 |
| - "userName": "${{ secrets.AZURE_USERNAME }}", |
399 |
| - "password": "${{ secrets.AZURE_PASSWORD }}" |
400 |
| - } |
401 |
| - }, |
402 |
| - "options": { |
403 |
| - "port": 1433, |
404 |
| - "database": "tedious" |
405 |
| - } |
406 |
| - } |
407 |
| - }' > ~/.tedious/test-connection.json |
408 | 356 | - name: run integration tests
|
| 357 | + env: |
| 358 | + AZURE_SERVER: ${{ secrets.AZURE_SERVER }} |
| 359 | + AZURE_USERNAME: ${{ secrets.AZURE_USERNAME }} |
| 360 | + AZURE_PASSWORD: ${{ secrets.AZURE_PASSWORD }} |
409 | 361 | run: npx nyc --reporter=lcov npm run test-integration
|
410 | 362 |
|
411 | 363 | - uses: codecov/codecov-action@v4
|
@@ -441,30 +393,17 @@ jobs:
|
441 | 393 |
|
442 | 394 | - run: npm ci
|
443 | 395 |
|
444 |
| - - run: mkdir ~/.tedious |
445 |
| - |
446 |
| - - name: Set up CI configuration (AD Authentication) |
447 |
| - run: | |
448 |
| - echo '{ |
449 |
| - "config": { |
450 |
| - "server": "${{ secrets.AZURE_SERVER }}", |
451 |
| - "authentication": { |
452 |
| - "type": "azure-active-directory-password", |
453 |
| - "options": { |
454 |
| - "clientId": "${{ secrets.AZURE_AD_SP_CLIENT_ID }}", |
455 |
| - "tenantId": "${{ secrets.AZURE_AD_TENANT_ID }}", |
456 |
| - "userName": "${{ secrets.AZURE_AD_USERNAME }}", |
457 |
| - "password": "${{ secrets.AZURE_AD_PASSWORD }}" |
458 |
| - } |
459 |
| - }, |
460 |
| - "options": { |
461 |
| - "port": 1433, |
462 |
| - "database": "tedious" |
463 |
| - } |
464 |
| - } |
465 |
| - }' > ~/.tedious/test-connection.json |
| 396 | + - name: Set up CI configuration |
| 397 | + shell: bash |
| 398 | + run: cp -f test/config.azure-ad-password.ts test/config.ts |
466 | 399 |
|
467 | 400 | - name: run integration tests
|
| 401 | + env: |
| 402 | + AZURE_SERVER: ${{ secrets.AZURE_SERVER }} |
| 403 | + AZURE_AD_SP_CLIENT_ID: ${{ secrets.AZURE_AD_SP_CLIENT_ID }} |
| 404 | + AZURE_AD_SP_TENANT_ID: ${{ secrets.AZURE_AD_SP_TENANT_ID }} |
| 405 | + AZURE_AD_USERNAME: ${{ secrets.AZURE_AD_USERNAME }} |
| 406 | + AZURE_AD_PASSWORD: ${{ secrets.AZURE_AD_PASSWORD }} |
468 | 407 | run: npx nyc --reporter=lcov npm run test-integration
|
469 | 408 |
|
470 | 409 | - uses: codecov/codecov-action@v4
|
@@ -500,29 +439,16 @@ jobs:
|
500 | 439 |
|
501 | 440 | - run: npm ci
|
502 | 441 |
|
503 |
| - - run: mkdir ~/.tedious |
504 |
| - |
505 |
| - - name: Set up CI configuration (AD Service Principal Authentication) |
506 |
| - run: | |
507 |
| - echo '{ |
508 |
| - "config": { |
509 |
| - "server": "${{ secrets.AZURE_SERVER }}", |
510 |
| - "authentication": { |
511 |
| - "type": "azure-active-directory-service-principal-secret", |
512 |
| - "options": { |
513 |
| - "clientId": "${{ secrets.AZURE_AD_SP_CLIENT_ID }}", |
514 |
| - "tenantId": "${{ secrets.AZURE_AD_SP_TENANT_ID }}", |
515 |
| - "clientSecret": "${{ secrets.AZURE_AD_SP_CLIENT_SECRET }}" |
516 |
| - } |
517 |
| - }, |
518 |
| - "options": { |
519 |
| - "port": 1433, |
520 |
| - "database": "tedious" |
521 |
| - } |
522 |
| - } |
523 |
| - }' > ~/.tedious/test-connection.json |
| 442 | + - name: set up test configuration |
| 443 | + shell: bash |
| 444 | + run: cp -f test/config.azure-ad-sp-secret.ts test/config.ts |
524 | 445 |
|
525 | 446 | - name: run integration tests
|
| 447 | + env: |
| 448 | + AZURE_SERVER: ${{ secrets.AZURE_SERVER }} |
| 449 | + AZURE_AD_SP_CLIENT_ID: ${{ secrets.AZURE_AD_SP_CLIENT_ID }} |
| 450 | + AZURE_AD_SP_TENANT_ID: ${{ secrets.AZURE_AD_SP_TENANT_ID }} |
| 451 | + AZURE_AD_SP_CLIENT_SECRET: ${{ secrets.AZURE_AD_SP_CLIENT_SECRET }} |
526 | 452 | run: npx nyc --reporter=lcov npm run test-integration
|
527 | 453 |
|
528 | 454 | - uses: codecov/codecov-action@v4
|
|
0 commit comments