Between april 20th and 21st our testing gitlab CI/CD pipeline started failing on commit. We thought that we had broken it ourselves (even though we did not change anything related to the test or the pipeline script) but after some testing we discovered that if we reran a job that previously succeeded it now also fails (obviously without any change to the code or the pipeline script). The error we get is during the “npx jest -ci” call; we get these errors for each test file:
FAIL xxxxx.test.js
70 ● Test suite failed to run
71 TypeError: Cannot redefine property: performance
72 at Object.<anonymous> (node_modules/react-native/jest/setup.js:445:20)
The pipeline forces the same version of npm and jest as our dev PCs on which the tests run just fine.
With the pipeline broken as it is we can’t release new versions of our application and it is therefore blocking us.
This can be reproduced with this simple pipeline script on our end:
image: node:alpine
before_script:
- npm install npm@8.1.2 -g
- apk add git
- npm ci
stages:
- test
- release
jest-tests:
stage: test
script:
- npx jest --v
- npx jest --ci
We therefore suspect a change on gitlab’s end maybe related to an update or something. Any help would be appreciated on this!