jeudi 29 octobre 2020

How to run development Node.js server in Codeship in one codeship step and get access to it from next parallel steps

We have Vue.js application and we have many Puppeteer E2E tests which we want to run in parallel using Codeship.

The problem is that we want to split tests to parallels but we want to avoid running development Vue.js server for each parallel process. We want to have it run before parallel steps and have access to it in parallel steps.

How is it possible to share network to get access to http://localhost:8080 from the step which runs development server?

Here is an example of tests we would like to have

- name: serve_app
  command: yarn serve # Run the development server and wait until it will be runned
- name: tests
  type: parallel
  steps:
    - name: acceptance_tests_1 # use shared network (localhost:8080) from serve_app step
      service: browser
      command: yarn test:acceptance:1
    - name: acceptance_tests_2 # use shared network (localhost:8080) from serve_app step
      service: browser
      command: yarn test:acceptance:2

Aucun commentaire:

Enregistrer un commentaire