test: run database tests in CI #345
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test, lint and check TS | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_call: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install SQL Server | |
uses: Particular/[email protected] | |
with: | |
connection-string-env-var: "Server=localhost,1433;User Id=sa;Password=Abcd3fgH1;" | |
catalog: tenants-leases-test | |
sqlserver-version: 2019 | |
- name: Verify SQL Server Connection | |
run: | | |
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P YourStrongPassword123! -Q "SELECT @@VERSION" | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm run test:ci | |
- name: Run linting | |
run: npm run lint | |
- name: Check TS | |
run: npm run ts:ci |