Travis-CI build is failing due to CompileSwift build command failures

While building an iOS project on Travis-CI, I am getting multiple build command failures like:-

**Testing failed: Use of undeclared type ‘SomeClassCancelDelegate’

Use of undeclared type ‘SomeClassPaymentCell’

Use of undeclared type ‘SomeClassPaymentCell’

Use of unresolved identifier ‘SomeViewController’

Command CompileSwift failed with a nonzero exit code

Testing cancelled because the build failed.**

** TEST FAILED **

The following build commands failed: CompileSwift normal x86_64 /Users/travis/build/some-Group/someproject-ios/Modules/SubModules/SomeViewControllerExtensions.swift

Is there a way to configure .yml file so that Travis will ignore such failures and let the build succeed?

Thanks a lot in advance for your help!