diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a7e7810..2df96a1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,11 +22,28 @@ jobs: - name: Run unit tests run: npm run test:unit + + integration-test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + + - name: Install dependencies + run: npm install + - name: Run integration tests + run: npm run test:integration + merge-check: - needs: test + needs: [test, integration-test] runs-on: ubuntu-latest steps: - name: Check test status - if: ${{ needs.test.result != 'success' }} + if: ${{ needs.test.result != 'success' || needs.integration-test.result != 'success' }} run: exit 1 # Exit with a non-zero status code if tests fail diff --git a/tests/setup.ts b/tests/setup.ts index 85c7706..63086f7 100644 --- a/tests/setup.ts +++ b/tests/setup.ts @@ -67,7 +67,8 @@ async function setup () { console.log('starting server...'); globalThis.fumeServer = new FumeServer(); await globalThis.fumeServer.warmUp({ - FHIR_SERVER_BASE: LOCAL_FHIR_API + FHIR_SERVER_BASE: LOCAL_FHIR_API, + FHIR_PACKAGES: 'il.core.fhir.r4@0.13.0' }); globalThis.app = globalThis.fumeServer.getExpressApp(); console.log('server started!');