Reputation: 355
I use simple demo react app project and dcpkerize it .But Travic CI think that its ruby project and install ruby dependencies every commit. Why so?
travis.yml
sudo: required
services:
- docker
before_install:
- docker build -t axixa/docker-react -f Dockerfile.dev .
script:
- docker run axixa/docker-react npm run test -- --coverage
test project linkg https://github.com/ahvahsky2008/docker-react
Upvotes: 0
Views: 82
Reputation: 14776
Use language: generic
at the top of your .travis.yml
file.
And you do not need services: [docker]
and probably not sudo: required
.
This is how I am using it to test more complex apps:
# .travis.yml
language: generic
script:
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- docker-compose build
- docker-compose run test
Seems like docker and docker-compose are a part of the base travis image.
Upvotes: 1