Multiple Environments in Travis CI

Andreas Gohr

Travis has an easy way to test a project against different PHP versions.

Now I want to run tests for plugins. For that I wrote a script that is called in the install phase of .travis.yml which checks out the main project and moves my plugin source into the correct directory. Then the tests are run. So far so good.

Now I would like to provide two of these scripts. One that checks out the main project's current master branch and one that checks out the latest stable version. The plugin should be tested against both checkouts in completely separate test runs just like it is ran against different PHP versions.

Is there a simple way to configure this in .travis.yml?

user2288008

You need to use env option:

env:
    - TEST_NAME=my_test_1
    - TEST_NAME=my_test_2
    - TEST_NAME=my_test_3

script:
    - ./test-run.sh --test-name=${TEST_NAME}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related