Skip to content

Remove registry-url to fix npm trusted publishing #134

Remove registry-url to fix npm trusted publishing

Remove registry-url to fix npm trusted publishing #134

Workflow file for this run

name: Build and test
on:
push:
jobs:
test:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
sql-version: ["2017-latest", "2019-latest", "2022-latest"]
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:${{ matrix.sql-version }}
env:
SA_PASSWORD: ${{ secrets.SA_PASSWORD }}
ACCEPT_EULA: Y
ports:
- 1433:1433
options: >-
--health-cmd "timeout 1 bash -c 'cat < /dev/null > /dev/tcp/localhost/1433'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
--health-start-period 10s
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
- name: Run lint
run: npm run lint
- name: Check formatting
run: npm run format:check
- name: Install SQL Server command-line tools
run: |
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools18 unixodbc-dev
echo "/opt/mssql-tools18/bin" >> $GITHUB_PATH
- name: Create test database
run: sqlcmd -S localhost -U sa -P "${SA_PASSWORD}" -C -Q "CREATE DATABASE testdb"
env:
SA_PASSWORD: ${{ secrets.SA_PASSWORD }}
- name: Run tests
run: npm run test
continue-on-error: true
env:
SQLONFHIR_TEST_PATH: ./sqlonfhir/tests
MSSQL_HOST: localhost
MSSQL_DATABASE: testdb
MSSQL_USER: sa
MSSQL_PASSWORD: ${{ secrets.SA_PASSWORD }}
- name: Upload test report artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: test-report-${{ matrix.sql-version }}
path: out/test-report.json
retention-days: 30