Unfortunately, GitLab didn't provide a tool to validate CI configuration for quite a while. Now that changed with the glab CLI providing glab ci lint but it is quite limited and under the hood just ...
Note that some tests perform locale-sensitive assertions. If you use non-English locale, you need to adjust the command above. For example: LANG=C mvn clean install ...