From 20ae951fb537527e8962d5ad99bb11af7e51e01e Mon Sep 17 00:00:00 2001 From: lizozom Date: Sun, 24 Mar 2024 14:15:16 +0200 Subject: [PATCH 1/5] test: add integration step --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a7e7810..7ffc70f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,6 +23,9 @@ jobs: - name: Run unit tests run: npm run test:unit + - name: Run integration tests + run: npm run test:integration + merge-check: needs: test runs-on: ubuntu-latest From 9c32ed499809273c98d6257eff8fa00005e6e954 Mon Sep 17 00:00:00 2001 From: lizozom Date: Sun, 24 Mar 2024 15:07:11 +0200 Subject: [PATCH 2/5] test: load package --- tests/setup.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/setup.ts b/tests/setup.ts index 85c7706..5393ca8 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.11.0' }); globalThis.app = globalThis.fumeServer.getExpressApp(); console.log('server started!'); From 6182f0ac0fd4fec5d87967f94f5a46a0bade64e4 Mon Sep 17 00:00:00 2001 From: lizozom Date: Sun, 24 Mar 2024 16:07:46 +0200 Subject: [PATCH 3/5] test: merge check to include integration test --- .github/workflows/test.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7ffc70f..0c44131 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,14 +22,25 @@ 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: 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 From d1905d3d291bef8beaf56262fb38df50478618cd Mon Sep 17 00:00:00 2001 From: lizozom Date: Sun, 24 Mar 2024 16:10:08 +0200 Subject: [PATCH 4/5] test: install --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0c44131..2df96a1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,6 +33,9 @@ jobs: 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 From a4f8a885371e6f912535aeddbc2086ba7c66184f Mon Sep 17 00:00:00 2001 From: Liza Katz Date: Wed, 27 Mar 2024 12:20:34 +0200 Subject: [PATCH 5/5] Update setup.ts --- tests/setup.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/setup.ts b/tests/setup.ts index 5393ca8..63086f7 100644 --- a/tests/setup.ts +++ b/tests/setup.ts @@ -68,7 +68,7 @@ async function setup () { globalThis.fumeServer = new FumeServer(); await globalThis.fumeServer.warmUp({ FHIR_SERVER_BASE: LOCAL_FHIR_API, - FHIR_PACKAGES: 'il.core.fhir.r4@0.11.0' + FHIR_PACKAGES: 'il.core.fhir.r4@0.13.0' }); globalThis.app = globalThis.fumeServer.getExpressApp(); console.log('server started!');