-
Notifications
You must be signed in to change notification settings - Fork 40
/
.travis.yml
86 lines (86 loc) · 4.45 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
version: "~> 1.0"
language: php
dist: jammy
php:
- 8.3
services:
- docker
stages:
- lint
- test
- deploy
env:
global:
- DDEV_NO_INSTRUMENTATION=true
# This is a dummy token, just to satisfy the conditions for testing.
- ROLLBAR_SERVER_TOKEN=df6ce617465b4980afdecc95ed1b42de
- PANTHEON_GIT_URL="ssh://codeserver.dev.5acc1750-abf0-47ef-a6d8-6890a6efaca8@codeserver.dev.5acc1750-abf0-47ef-a6d8-6890a6efaca8.drush.in:2222/~/repository.git"
- secure: mm3oDnHjiBXYmhWFBxbVnPm6I48zTZhhUM9JIclwymld9SR/qjXV7qy7sjqxyT7eGLvyFcJAcDDshG1gGJ5UBjC6vKYYbEAtV/OMdORBfNzLboRGeIXAevlgqP9Sl8qSQIMOI0pUP2/nRgd3fXerLwtL1BTXI+Bl3o6bQSR57EzKBfI4WTjrUdUs9u04qMyuoS+UHWEyBZpJ/AEdkxuVOessSXYgIiijwpFmLV/07RyXAGWIYosbYiVH8genjm1h8BhK9NRUVjgfKr7SuGKOEe53A0PQNWCZnbkYQ/KJo4GF1DvzGO12xX8//mNgZmATTNh36uCt7ofNpR6gtHbLJBGVAlHaGbH9CkG+G/mdmKxblT3Bqj+W4oalXd43FGDOH72aP8mJU67vl2UOzWxOIwv735lMgzEHUG1H0ltF0LrjYuIFYGWJByDZ+lZdurDdnnKHMOVGMhJ+x0ns+R8AYWzZKH3Za0LQDFR0d1npATgZlDJRk4W8mVNhEnYAfryNGZkK8onFt6rjfWyTdwM08qE2jUtcQY2dRCbGfsRfQpyvn7RQBPrXxaLKFOoR4AIXWWUDZ4uFTmZAJpcRBAQPchQ3udjg/hT74V44nd2lg3cLv30RekAq36vVDKwHGWHdnflZ7ci1zgvbIv7Otf9QQO7mwj0JCzk7EIBnHivEy10=
before_install:
- openssl aes-256-cbc -K $encrypted_2c02e48ad60e_key -iv $encrypted_2c02e48ad60e_iv
-in travis-key.enc -out travis-key -d
- export PATH="$HOME/.config/composer/vendor/bin:$PATH"
git:
depth: 500
jobs:
allow_failures:
env:
- CAN_FAIL=true
include:
- stage: Lint
name: PhpStan
script:
- "$TRAVIS_BUILD_DIR/ci-scripts/test_syntax.sh || travis_terminate 1;"
- composer install
- vendor/bin/phpstan analyse -c phpstan.neon
- stage: Lint
name: Drupal coding standard
script:
- composer install || travis_terminate 1;
- vendor/bin/robo phpcs || travis_terminate 1;
- stage: Lint
name: 'Shell coding standard: shellcheck'
script:
- "$TRAVIS_BUILD_DIR/ci-scripts/install_shell.sh || travis_terminate 1;"
- "$TRAVIS_BUILD_DIR/ci-scripts/test_shell.sh || travis_terminate 1;"
- stage: Test
name: 'Backend tests: Functional tests'
if: (branch != "main" AND tag IS blank)
script:
- "(travis_retry $TRAVIS_BUILD_DIR/ci-scripts/install_ddev.sh) || travis_terminate 1;"
- "$TRAVIS_BUILD_DIR/ci-scripts/install_drupal.sh || travis_terminate 1;"
- "$TRAVIS_BUILD_DIR/ci-scripts/test_phpunit.sh || travis_terminate 1;"
- "$TRAVIS_BUILD_DIR/ci-scripts/test_phpunit_rollbar.sh || travis_terminate 1;"
- stage: Deploy
env: CAN_FAIL=true
name: 'Backend tests: Functional tests and deploy to Pantheon QA'
if: branch = "main" AND type = push AND tag IS blank
script:
- "(travis_retry $TRAVIS_BUILD_DIR/ci-scripts/install_ddev.sh) || travis_terminate 1;"
- "$TRAVIS_BUILD_DIR/ci-scripts/install_drupal.sh || travis_terminate 1;"
- "$TRAVIS_BUILD_DIR/ci-scripts/test_phpunit.sh || travis_terminate 1;"
- "(travis_retry $TRAVIS_BUILD_DIR/ci-scripts/prepare_deploy.sh) || travis_terminate 1;"
- "(travis_retry ddev robo deploy:pantheon qa --no-interaction) || travis_terminate 1;"
- ddev composer install || travis_terminate 1;
- ddev robo deploy:notify || travis_terminate 1;
- stage: Deploy
name: 'Backend tests: Functional tests and deploy to Pantheon TEST'
if: tag IS present AND type = "push" AND tag !~ /live$/
script:
- "(travis_retry $TRAVIS_BUILD_DIR/ci-scripts/install_ddev.sh) || travis_terminate 1;"
- "$TRAVIS_BUILD_DIR/ci-scripts/install_drupal.sh || travis_terminate 1;"
- "$TRAVIS_BUILD_DIR/ci-scripts/test_phpunit.sh || travis_terminate 1;"
- "(travis_retry $TRAVIS_BUILD_DIR/ci-scripts/prepare_deploy.sh) || travis_terminate 1;"
- "(travis_retry ddev robo deploy:tag-pantheon --no-interaction $TRAVIS_TAG master) || travis_terminate 1;"
- ddev composer install || travis_terminate 1;
- "(travis_retry ddev robo deploy:pantheon-sync) || travis_terminate 1;"
- stage: Deploy
name: 'Backend tests: Functional tests and deploy to Pantheon LIVE'
if: tag IS present AND type = "push" AND tag =~ /live$/
script:
- "$TRAVIS_BUILD_DIR/ci-scripts/check_live_deploy.sh || travis_terminate 1;"
- "(travis_retry $TRAVIS_BUILD_DIR/ci-scripts/install_ddev.sh) || travis_terminate 1;"
- "$TRAVIS_BUILD_DIR/ci-scripts/install_drupal.sh || travis_terminate 1;"
- "$TRAVIS_BUILD_DIR/ci-scripts/test_phpunit.sh || travis_terminate 1;"
- "(travis_retry $TRAVIS_BUILD_DIR/ci-scripts/prepare_deploy.sh) || travis_terminate 1;"
- "(travis_retry ddev robo deploy:pantheon-sync live) || travis_terminate 1;"