forked from wirecard/oxid-ee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (66 loc) · 1.96 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
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
- MODULE_NAME=${TRAVIS_REPO_SLUG}
- MODULE_PATH=wirecard/paymentgateway
matrix:
include:
- php: 7.1
- php: 7.2
- 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: branch = master OR 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'
- docker exec ${OXID_CONTAINER} bash -c 'reset-shop.sh && runtests-selenium.sh'
after_script:
- .bin/generate-tag.sh
before_deploy:
- travis_retry composer install
- export REPO_NAME=$(echo ${TRAVIS_REPO_SLUG} | awk -F'/' '{print $2}')
- export RELEASE_NOTES=$(composer make-release-notes)
- bash .bin/generate-readme-badge.sh
deploy:
on:
repo: ${TRAVIS_REPO_SLUG}
tags: true
provider: releases
api_key: ${GITHUB_TOKEN}
name: '${REPO_NAME} ${TRAVIS_TAG}'
body: '${RELEASE_NOTES}'
skip_cleanup: true