DEV Community

Mpho Mphego
Mpho Mphego

Posted on

SOS: Testing multiple subdirectories with Travis

This goes to all TravisCI ninjas

I have a repo with all my Dockerfiles and I would like Travis to run tests on them individually, but they are all in various directories. Below is how my directories are structured.

GitHub repo
    |-> fast.ai
        |- .travis.yml
        |- Dockerfile
    |-> Jekyll
        |- .travis.yml
        |- Dockerfile
    |-> LaTex
        |- .travis.yml
        |- Dockerfile

    |-> .travis.yml
Enter fullscreen mode Exit fullscreen mode

I was able to run a Travis build, but then this just pretty much aggregates all the results into one Travis svg.

language: c
sudo: required

services:
    - docker
notifications:
  email: false

install:
  - make -C fast.ai build && make -C fast.ai run
  - make -C Jekyll build && make -C Jekyll run

before_install:
  - cd fast.ai && git clone --depth 1 https://github.com/fastai/fastai.git && cd -
  - cd Jekyll && git clone --depth 1 https://github.com/mmphego/mmphego.github.io && cd -

script:
- docker ps -a

Enter fullscreen mode Exit fullscreen mode

Q: Is it possible to run Travis to multiple directories and have multiple results?

Top comments (2)

Collapse
 
mmphego profile image
Mpho Mphego

Oh well!!!
Cannot be done at this stage: github.com/travis-ci/travis-ci/iss...

Collapse
 
mmphego profile image
Mpho Mphego

I hope that makes sense.