From 3691f7b6af2a069d52dbb47338bce12dc9291cd3 Mon Sep 17 00:00:00 2001 From: Antoine Sein Date: Wed, 27 Mar 2024 15:40:20 +0100 Subject: [PATCH] Run mock server as docker image --- .github/workflows/run_ci.yaml | 26 +++++++------------ .../features/step-definitions/faxes.steps.ts | 4 +-- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/run_ci.yaml b/.github/workflows/run_ci.yaml index 41de1694..17e34df6 100644 --- a/.github/workflows/run_ci.yaml +++ b/.github/workflows/run_ci.yaml @@ -8,13 +8,18 @@ on: branches: [main] jobs: - start-mock-server: + build: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] steps: - - name: Set up Node.js + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: - node-version: 18.x + node-version: ${{ matrix.node-version }} + # Start the mock server - name: Start the mock server run: | @@ -23,20 +28,7 @@ jobs: git checkout upgrade-to-typescript yarn install yarn run compile - AUTH_PORT=8020 NUMBERS_PORT=8021 SMS_PORT=8022 CONVERSATION_PORT=8023 VERIFICATION_PORT=8024 VOICE_PORT=8025 FAX_PORT=8026 node --experimental-specifier-resolution=node dist/index.js - - build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x, 20.x] - needs: start-mock-server - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} + docker-compose up -d # Install dependencies - run: yarn install diff --git a/packages/fax/tests-e2e/features/step-definitions/faxes.steps.ts b/packages/fax/tests-e2e/features/step-definitions/faxes.steps.ts index 87be7f9c..b92148f2 100644 --- a/packages/fax/tests-e2e/features/step-definitions/faxes.steps.ts +++ b/packages/fax/tests-e2e/features/step-definitions/faxes.steps.ts @@ -15,9 +15,9 @@ Given('the Fax service is available', function () { projectId: 'projectId', keyId: 'keyId', keySecret: 'keySecret', - authBaseUrl: 'http://localhost:8020', + authBaseUrl: 'http://localhost:6039', }); - faxService.setBasePath('http://localhost:8026'); + faxService.setBasePath('http://localhost:6046'); }); When('I send a request to list faxes', async function () {