Definitely not via .travis.yml. If that’s even something that you can configure, that’s going to be via something like sysctl -w.
But most probably, this is just a bug in your code that’s not even relevant to any system-specific limits. Even in the unlikely case it is relevant, this is still a bug because your code shouldn’t critically depend on any specific kernel configuration parameters.