#Troubleshooting Class-Validator Test Failures in NestJS API Migration from GitLab to GitHub Actions

15 messages · Page 1 of 1 (latest)

dull prawn
#

Hello, I am in the process of migrating a NestJS API from GitLab to GitHub Actions. My goal is to replicate the currently functioning integration test job. However, I am encountering issues: only the tests targeting endpoints that utilize class-validator and class-transformer are failing.

I'm looking for guidance on where to investigate the issue I'm facing. My setup involves a somewhat similar runner to GitLab's, and unit tests are functioning correctly. Feel free to ask for any additional details that you think might be relevant to resolving this problem.

dull prawn
#

I have some news, The issue is that it tries to validate props from other class who have nothing in common... Still don't know why

keen tundra
#

Just run it through docker-compose so that you know it's always running the way you expect it. Changing from gitlab's pipeline to github shouldn't make a difference

#

(github has a package to run the pipeline locally!) dont remember what its called though

half fox
warm trellis
dull prawn
#

Yes but really, it's working in docker compose, locally, on gitlab and not on Github action

half fox
#

So what's the difference between GitHub and the others? They should all be the same

dull prawn
#

The only difference is that on Github we're using ubuntu jammy and on gitlab it's alpine. But still locally it's working on ubuntu, macos and windows

half fox
#

That shouldn't cause any changes in the way node acts

dull prawn
#

We have an other node modules caching solution on Github maybe it can be the problem

#

Anyway my question is more about why class-validator can try to validate wrong props

half fox
#

By all accounts, it doesn't make sense for it to do that, so I don't have an answer for you

dull prawn
#

Yes I understand, sorry if I can't give more details, it's a weird problem

keen tundra