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: 76322d099f5a82ae4ff2e4bee7bc4fe0210dcca4 (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
33
34
#!/bin/bash

# only initiate UI tests after integration tests for php 5.5 are completed
if [ "$TEST_SUITE" != "IntegrationTests" ] || [[ "$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

git submodule update

cd tests/PHPUnit/UI

git checkout master
git pull --rebase origin master

echo "$TRAVIS_COMMIT
$TRAVIS_BRANCH" > piwik_commit.txt

git config --global user.email "hello@piwik.org"
git config --global user.name "Piwik Automation"

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

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