Testcontainers support in Travis CI


This repository contains a Gradle project with a simple network test to validate Travis CI build pipeline.

The test tries to connect to a Docker container, which listens for requests in the port 8080 and returns a HTTP 200 OK code with a string.

You can clone and validate the test is passing in a local machine, however, it fails on Travis CI with a connection refused error.

To run the test in your machine you will need a Java SDK and Docker installed. Then run the command under the project directory:

./gradlew test

An example of a failed build:

Edit: The GitHub workflow for the same build is working.

1 Like