Gitlab CI does not execute npm scripts

I am trying to make a CI script run on the gitlab slider.

I want just:

First you need to run the npm install command to extract all the necessary npm packages.

After that must be performed npm testand npm run build.

.gitblab-ci.yml The script looks like this:

before_script:
  - cd my/folder/
  - npm install --silent

stages:
  - test
  - build

run_tests:
  script:
    - npm test
  stage: test

build:
  script:
    - npm run build
  stage: build

Unfortunately, only npm installperformed twice. And it is not silent.
npm testand npm run buildnever called.

Can someone tell me what I am doing wrong?

+4
source share
1 answer

I had a similar problem:

setup:                                                                                          
    stage: setup
    script:
        - npm install
        - echo "done"

echo "done" . , call npm:

setup:                                                                                          
    stage: setup
    script:
        - call npm install
        - echo "done"

. -, - , .

0

Source: https://habr.com/ru/post/1674879/


All Articles