3

As the title says, I simply want to run ng test from within gitlabCI.. but all the flags I've seen mentioned don't affect anything.. the routine just sits and sits. are these flags enough or do I need to setup jest.config.js ? I see mention of karma.conf.d in other tutorials but I do not have that file at all in the project

package.json

  "scripts": {
    "affected:apps": "nx affected:apps",
...
    "test:ci": "ng test --watch=false --no-watch",

.gitlab-ci.yml

run-ng-test-ci:
  tags:
  - juju
  stage: test
  image: registry.gitlab.com/jrgemcp-public/gitlab-cicd-docker/build-mahrio-docker:latest
  script:
  - node --version
  - npm --version
  - npm ci --cache .npm --prefer-offline --ignore-scripts --quiet
  - npm run test:ci
$ node --version
v14.20.0
$ npm --version
6.14.17

EDIT: Seems it's perhaps a Jest issue

https://forum.gitlab.com/t/runner-hangs-sometimes-after-all-jest-tests-are-completed/38853

R. Richards
  • 24,603
  • 10
  • 64
  • 64
Erik
  • 2,782
  • 3
  • 34
  • 64

0 Answers0