I am trying to write if condition to a Travis stage so it will be executed only if the PR contains files from a certain path. The following does not work for me and I guess the syntax is wrong.
jobs:
include:
- stage: test
name: "my test"
if: [ `git diff --name-only ${TRAVIS_COMMIT_RANGE}` == *"dir"* ]
script:
- echo "execute"