DEV Community

loading...

SOS: Testing multiple subdirectories with Travis

Mpho Mphego
Software Engineer in Cape Town, South Africa
・1 min read

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?

Discussion (2)

Collapse
mmphego profile image
Mpho Mphego Author

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

Collapse
mmphego profile image
Mpho Mphego Author

I hope that makes sense.