A lot of people are questioning the value of using nvm in CI, but I think the main reason is just that the .nvmrc file is shared between dev/CI. It's a minor benefit, but still nice.
That said, rtx is so much simpler for this:
curl https://rtx.pub/rtx-latest-linux-x64 > /usr/bin/rtx
rtx install
rtx x -- npm install
rtx x -- npm run test
it'll automatically use the .nvmrc/.node-version file. If developers want to use nvm locally, they still can.