Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSun90 authored Aug 7, 2024
2 parents c14419e + 42617e4 commit b6b88f1
Show file tree
Hide file tree
Showing 11 changed files with 1,469 additions and 12,267 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/[email protected]


# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
114 changes: 85 additions & 29 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]

with:
fetch-depth: 0
- name: Use Node.js 18
uses: actions/setup-node@v3
uses: actions/setup-node@v4.0.3
with:
node-version: 18

- name: Determine npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
- uses: actions/cache@v4.0.2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -50,10 +51,11 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]


- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -63,7 +65,7 @@ jobs:
- name: Start containers
run: |
docker-compose -f "test/docker-compose.linux.yml" up --detach
docker compose -f "test/docker-compose.linux.yml" up --detach
- name: Set up CI configuration
shell: bash
Expand All @@ -76,9 +78,9 @@ jobs:
- name: Determine npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
- uses: actions/cache@v4.0.2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -206,10 +208,11 @@ jobs:
Pop-Location
- uses: actions/checkout@v3
- uses: actions/[email protected]


- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4.0.3
with:
node-version: ${{ matrix.node-version }}

Expand Down Expand Up @@ -257,10 +260,11 @@ jobs:

- name: Determine npm cache directory
id: npm-cache
shell: bash
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
- uses: actions/cache@v4.0.2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -330,17 +334,18 @@ jobs:
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}

steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]

- name: Use Node.js 18
uses: actions/setup-node@v3
uses: actions/setup-node@v4.0.3
with:
node-version: 18

- name: Determine npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v3
echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v4.0.2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -373,18 +378,19 @@ jobs:
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}

steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]

- name: Use Node.js 18
uses: actions/setup-node@v3
uses: actions/setup-node@v4.0.3
with:
node-version: 18

- name: Determine npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
- uses: actions/cache@v4.0.2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -410,6 +416,54 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

token-credential-auth:
name: Azure SQL Server / Node.js 18.x
runs-on: ubuntu-latest
timeout-minutes: 20

# Only run these tests if we have access to the secrets
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}

steps:
- uses: actions/[email protected]

- name: Use Node.js 18
uses: actions/[email protected]
with:
node-version: 18

- name: Determine npm cache directory
id: npm-cache
run: |
echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/[email protected]
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci

- name: Set up CI configuration
shell: bash
run: cp -f test/config.token-credential.ts test/config.ts

- name: run integration tests
env:
AZURE_SERVER: ${{ secrets.AZURE_SERVER }}
AZURE_AD_SP_CLIENT_ID: ${{ secrets.AZURE_AD_SP_CLIENT_ID }}
AZURE_AD_SP_TENANT_ID: ${{ secrets.AZURE_AD_SP_TENANT_ID }}
AZURE_AD_USERNAME: ${{ secrets.AZURE_AD_USERNAME }}
AZURE_AD_PASSWORD: ${{ secrets.AZURE_AD_PASSWORD }}
run: npx nyc --reporter=lcov npm run test-integration

- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}


azure-ad-service-principal-auth:
name: Azure SQL Server / Node.js 18.x
runs-on: ubuntu-latest
Expand All @@ -419,18 +473,19 @@ jobs:
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}

steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]

- name: Use Node.js 18
uses: actions/setup-node@v3
uses: actions/setup-node@v4.0.3
with:
node-version: 18

- name: Determine npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
- uses: actions/cache@v4.0.2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down Expand Up @@ -462,18 +517,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]

- name: Use Node.js 18
uses: actions/setup-node@v3
uses: actions/setup-node@v4.0.3
with:
node-version: 18

- name: Determine npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
- uses: actions/cache@v4.0.2
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/[email protected]

- name: Use Node.js 18
uses: actions/setup-node@v3
uses: actions/setup-node@v4.0.3
with:
node-version: 18

Expand Down
Loading

0 comments on commit b6b88f1

Please sign in to comment.