Welcome to mirror list, hosted at ThFree Co, Russian Federation.

initiate_ui_tests.sh « travis « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3dc5a3d9b1ee18d2d3c7ab3058dbb516db6d3192 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash

# initiate UI tests before starting system tests for php 5.5
if [ "$TEST_SUITE" != "SystemTests" ] || [[ "$TRAVIS_PHP_VERSION" != 5\.5* ]]; then
    echo "Not initiating UI tests (\$TEST_SUITE = $TEST_SUITE, \$TRAVIS_PHP_VERSION = $TRAVIS_PHP_VERSION)."
    exit
fi

if [ "$PIWIK_AUTOMATION" = "" ]; then
    echo "Automation details are not present, skipping UI tests."
    exit
fi

COMMIT_MESSAGE=$(git log "$TRAVIS_COMMIT" -1 --pretty=%B)

cd tests/PHPUnit/UI

UI_BRANCH="master"
git checkout $UI_BRANCH
git pull --rebase origin $UI_BRANCH

echo "$TRAVIS_COMMIT
$TRAVIS_BRANCH" > piwik_commit.txt

git add ./piwik_commit.txt
git commit -m "Travis: Initiating build for commit '$TRAVIS_COMMIT' on branch '$TRAVIS_BRANCH': $COMMIT_MESSAGE"
git remote set-url origin "https://piwik-auto-commit-bot:$PIWIK_AUTOMATION@github.com/piwik/piwik-ui-tests.git"

if ! git push origin $UI_BRANCH 2> /dev/null; then
    echo "Failed to push!"
    exit 1
fi