Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TravisCI configuration for auto #237

Merged
merged 6 commits into from
Jun 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 27 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,23 @@ matrix:
before_install:
- if [ "${CHECK_TYPE}" == "auto-svl" ]; then
CHECK_BRANCH=$( git branch | grep \*);
if [ "${CHECK_BRANCH}" == "* master" ]; then
if [ "${CHECK_BRANCH:20}" == "FETCH_HEAD)" ]; then
echo "!!! On branch ${CHECK_BRANCH}, skipping auto-svl";
else
echo "!!! On branch ${CHECK_BRANCH}, preparing environment for auto-svl";
git config --local user.name "${GIT_NAME}";
git config --local user.email "${GIT_EMAIL}";
else
echo "On branch ${CHECK_BRANCH}, skipping auto-svl";
fi;
else
python -m pip install --upgrade pip;
fi
- if [ "${CHECK_TYPE}" == "linting" ]; then
CHECK_BRANCH=$( git branch | grep \*);
echo "On branch ${CHECK_BRANCH}";
pip install flake8;
fi
- if [ "${CHECK_TYPE}" == "test" ]; then
CHECK_BRANCH=$( git branch | grep \*);
echo "On branch ${CHECK_BRANCH}";
pip install "pytest>=4.6" pytest-cov coverage coveralls codecov;
fi
- if [ "${CHECK_TYPE}" == "docdoctest" ]; then
CHECK_BRANCH=$( git branch | grep \*);
echo "On branch ${CHECK_BRANCH}";
pip install "sphinx>2.0" sphinx_rtd_theme pandas sphinx-argparse;
fi

Expand All @@ -80,18 +75,31 @@ install:
pip install dist/*.whl;
elif [ "${INSTALL_TYPE}" == "auto-svl" ]; then
CHECK_BRANCH=$( git branch | grep \*);
if [ "${CHECK_BRANCH}" == "* master" ]; then
curl -vkL -o - https://github.com/intuit/auto/releases/download/v9.39.0/auto-linux.gz | gunzip > build/auto;
chmod a+x build/auto;
else
echo "On branch ${CHECK_BRANCH}, skipping auto-svl";
if [ "${CHECK_BRANCH:20}" == "FETCH_HEAD)" ]; then
echo "!!! On branch ${CHECK_BRANCH}, skipping auto-svl";
else
echo "!!! On branch ${CHECK_BRANCH}, setting up auto-svl";
curl -vkL -o - https://github.com/intuit/auto/releases/download/v9.39.0/auto-linux.gz | gunzip > build/auto;
chmod a+x build/auto;
fi;
else
false;
fi

script:
- |
CHECK_BRANCH=$( git branch | grep \*);
echo "**********";
echo "******";
echo "**";
if [ "${CHECK_BRANCH:20}" == "FETCH_HEAD)" ]; then
echo "!!! On branch ${CHECK_BRANCH}, this should be a **test for submitted PR**";
else
echo "!!! On branch ${CHECK_BRANCH}, this should be a **test after MERGE**";
fi;
echo "**";
echo "******";
echo "**********";
if [ "${CHECK_TYPE}" == "linting" ]; then
flake8 phys2bids;
elif [ "${CHECK_TYPE}" == "docdoctest" ]; then
Expand All @@ -106,10 +114,11 @@ script:
python -m pytest ${args} phys2bids;
elif [ "${CHECK_TYPE}" == "auto-svl" ]; then
CHECK_BRANCH=$( git branch | grep \*);
if [ "${CHECK_BRANCH}" == "* master" ]; then
build/auto shipit;
else
echo "Not on master branch, skipping auto-svl";
if [ "${CHECK_BRANCH:20}" == "FETCH_HEAD)" ]; then
echo "!!! On branch ${CHECK_BRANCH}, skipping auto-svl";
else
echo "!!! On branch ${CHECK_BRANCH}, run auto-svl!";
build/auto shipit;
fi;
else
false;
Expand Down