Check multiple subdirectories
I have a project with multiple subdirectories which I all want to check in turn. Actually, these directories are a bit outdated version of branches which I have to keep for various reasons.
In my main folder I have the subdirectories patch
and pkg and want to check both. I tried to use the
following script to achieve this.
environment:
matrix:
- TEST_DIR: patch/
- TEST_DIR: pkg/
before_build:
- ps: echo %TEST_DIR%
- ps: cd %TEST_DIR%
build_script:
- travis-tool.sh install_deps
I also used $TEST_DIR and also had the lines
- ps: echo %TEST_DIR%
- ps: cd %TEST_DIR%
in build_script just before - travis-tool.sh
install_deps. None of this was working.
When I use echo %TEST_DIR% it echos
%TEST_DIR% and with echo $TEST_DIR
nothing is echoed, i.e., the string seems to be empty. Any
clues?
In Travis-CI I can use
## test multiple directories
## (see https://lord.io/blog/2014/travis-multiple-subdirs/)
env:
- TEST_DIR=patch/
- TEST_DIR=pkg/
language: r
sudo: required
## change directory before installation
## as R packages are not available elsewise
before_install:
- cd $TEST_DIR
which works like a charm.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Feodor Fitsner on 29 Oct, 2015 04:36 PM
It should be:
2 Posted by Benjamin on 29 Oct, 2015 04:46 PM
Thanks, Feodor. That works.
Yet, now I cannot find the build script itself anymore:
Do I need to change the working directory at another point in the script? Please see my complete script here:
https://github.com/hofnerb/gamboostLSS/blob/AppVeyor/appveyor.yml
Support Staff 3 Posted by Feodor Fitsner on 29 Oct, 2015 06:42 PM
Well, I guess you can't run
.shscript "as is" on Windows.4 Posted by Benjamin on 30 Oct, 2015 09:39 AM
Well, actually this script works well for other projects. So this can't be an issue. See e.g. https://github.com/hofnerb/stabs
5 Posted by Benjamin on 30 Oct, 2015 03:23 PM
The script simply wasn't in the right place. I needed to copy it. This worked:
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:01 AM.