NodeBB tests require database setup beforehand.
I recommend just checking out how NodeBB currently does it with
Node.js based forum software built for the modern web - NodeBB/test.yaml at master · NodeBB/NodeBBfavicon
GitHub (github.com)or how it was done earlier with NodeBB/.travis.yml at 6e85920cb6e620188ae8fd8c085c8b43efbd27d4 · NodeBB/NodeBB
Node.js based forum software built for the modern web - NodeBB/.travis.yml at 6e85920cb6e620188ae8fd8c085c8b43efbd27d4 · NodeBB/NodeBBfavicon
I haven't used GitLab CI much, but I think the services part is pretty similar to GitHub Actions - there are some setup differences (per job variables instead of per service env for example), but I think just adapting the service configuration to GitLab syntax will be better than the bash based install from TravisCI