Angular + Karma + Gitlab CI: Karma tests timing out

Viewed 261

My karma test jobs aren't terminating properly on Gitlab CI.

The test job is called with ng test --progress false --watch false.

The tests run and return a successful result:

TOTAL: 16 SUCCESS
TOTAL: 16 SUCCESS

However the job never terminates with the gitlab Job succeeded message.

The pipeline was running perfectly yesterday and nothing has changed in the gitlab-ci.yml file.

What could be causing this and what can be done to address the problem?

Edit: This seems to be a result of the recent trion/ng-cli-karma update to version 14.0.0

2 Answers

The new version trion/ng-cli-karma (14.0.0) doesn't seem to handle the --watch argument correctly in the Gitlab CI currently for some reason. Until then, a work-around for now can be to use version (13.3.7) which is the currently latest one working. Notable though is that it seems to work outside the Gitlab CI.

Related