Update scope of formatting #15
This file contains hidden or 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: Build and test | |
| on: | |
| push: | |
| pull_request: | |
| 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 "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -Q 'SELECT 1'" | |
| --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: Create test database | |
| run: sqlcmd -S localhost -U sa -P "${SA_PASSWORD}" -Q "CREATE DATABASE testdb" | |
| env: | |
| SA_PASSWORD: ${{ secrets.SA_PASSWORD }} | |
| - name: Run tests | |
| run: npm test | |
| env: | |
| SQLONFHIR_TEST_PATH: ./sqlonfhir/tests | |
| MSSQL_HOST: localhost | |
| MSSQL_DATABASE: testdb | |
| MSSQL_USER: sa | |
| MSSQL_PASSWORD: ${{ secrets.SA_PASSWORD }} |