-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
101 lines (91 loc) · 3.16 KB
/
.travis.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
sudo: false
dist: xenial
language: php
services:
- docker
env:
global:
- MYSQL_USER=root
- MYSQL_PASSWORD=root
- MYSQL_DATABASE=oxid_db
- OXID_CONTAINER=oxid_ee_web
- OXID_VERSION=dev-b-6.1-ce
- OXID_COVERAGE_XML_ONLY=true
- MODULE_NAME=${TRAVIS_REPO_SLUG}
- MODULE_PATH=wirecard/paymentgateway
- OXID_RELEASES_FILE=${TRAVIS_BUILD_DIR}/.bin/shop-releases.txt
- MANUAL_UITEST_TRIGGER_COMMIT=TestMyBuild
- PATCH_RELEASE=patch
- MINOR_RELEASE=minor
- MAJOR_RELEASE=major
- UI_TEST_JUNIT_REPORT_FILE_NAME=report.xml
- UI_TEST_HTML_REPORT_FILE_NAME=report.html
jobs:
# these stages are allowed to fail
allow_failures:
- stage: phraseapp-check-if-in-sync
- stage: acceptance-test
env:
- GATEWAY=API-TEST
- OXID_RELEASE_VERSION=1
- ALLOW_FAIL=1
include:
- php: 7.1
if: type != cron AND commit_message !~ env(MANUAL_UITEST_TRIGGER_COMMIT)
- php: 7.2
if: type != cron AND commit_message !~ env(MANUAL_UITEST_TRIGGER_COMMIT)
- &acceptance-test
stage: acceptance-test
# run this stage on pull request if head branch name contains one of these words (patch, major, minor)
# or when build triggered ad-hoc with special commit message,
# tests will use extension version = branch which originated pull request
# or branch which was defined in ad-hoc trigger in Travis UI
if: (type = pull_request AND (head_branch =~ env(PATCH_RELEASE) OR head_branch =~ env(MINOR_RELEASE) OR head_branch =~ env(MAJOR_RELEASE))) OR (commit_message =~ env(MANUAL_UITEST_TRIGGER_COMMIT))
php: 7.1
env:
- GATEWAY=API-TEST
- OXID_RELEASE_VERSION=1
before_install:
- export OXID_VERSION="dev-$(awk "NR==$OXID_RELEASE_VERSION {print; exit}" ${OXID_RELEASES_FILE})"
- echo "Testing with Oxid version ${OXID_VERSION}"
script: docker exec ${OXID_CONTAINER} bash -c 'reset-shop.sh && runtests-selenium.sh'
after_script: skip
after_success:
- bash .bin/get-ui-reports.sh
- bash .bin/upload-logs-and-notify.sh
after_failure:
- bash .bin/get-ui-reports.sh
- bash .bin/upload-logs-and-notify.sh fail
- stage: phraseapp-pull
if: env(PHRASEAPP_PULL) = '1'
language: ruby
ruby: 2.5.3
before_install: skip
install:
- gem install bundler -v 2.0.1
- travis_retry bundle install
script:
- .bin/rake phraseapp:ci_update
after_script: skip
- stage: phraseapp-check-if-in-sync
if: type = pull_request
language: ruby
ruby: 2.5.3
before_install: skip
install:
- gem install bundler -v 2.0.1
- travis_retry bundle install
script:
- .bin/rake phraseapp:ci_check_if_in_sync
after_script: skip
install:
# build & start containers
- docker-compose -f docker-compose.ci.yml up --build -d
# wait till webserver ready
- timeout 300 bash -c 'while [[ "$(docker exec ${OXID_CONTAINER} curl -Ifs -o /dev/null -w ''%{http_code}'' http://localhost)" != "200" ]]; do sleep 2; done' || false
script:
- docker exec ${OXID_CONTAINER} phpcs-check.sh
- docker exec ${OXID_CONTAINER} phpmd.sh
- docker exec ${OXID_CONTAINER} bash -c 'runtests-coverage.sh && upload-coverage.sh'
notifications:
email: false