image: node:latest # Code linting linting: stage: eslint rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' script: - 'npm i -g eslint-cli' - 'npm i eslint --save-dev' - 'node node_modules\eslint\bin\eslint.js' allow_failure: true # Run tests testing: stage: unit-tests rules: - if: $CI_PIPELINE_SOURCE == 'merge_request_event' script: - 'npm install' - 'npm install jest -g' - 'cp configs/secrets.js.example configs/secrets.js' - 'jest --ci --reporters=default --reporters=jest-junit --testPathIgnorePatterns=./test/' artifacts: when: always reports: junit: - junit.xml #TODO: stage: integration-tests