Thierry Templier
Thierry Templier

Reputation: 202138

Configuring a Node project with sub modules in CircleCI

We have a project in Git containing several modules with the following structures:

project
|- module1
  |- package.json
  (...)
|- module2
  |- package.json
  (...)

Each package.json file has a test entry to execute tests of the module. So we can execute tests for a particular module like this (in the corresponding sub folder):

$ npm run test

Is it possible to configure such a project in CircleCI?

Thanks very much for your help!

Upvotes: 1

Views: 320

Answers (1)

FelicianoTech
FelicianoTech

Reputation: 4017

Yes you can, in a very similar fashion to how you would do it locally. In your circle.yml file test section, you would have a line for each module. Something like:

test:
  override:
    - cd module1; npm run test
    - cd module2; npm run test

More information on how to use circle.yml can be found here.

-Ricardo
Developer Evangelist, CircleCI

Upvotes: 1

Related Questions