forked from Gizra/drupal-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
64 lines (59 loc) · 3.08 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
version: ~> 1.0
sudo: required
language: php
dist: focal
php:
- 8.0
services:
- docker
stages:
- lint
- test
- deploy
env:
global:
- PANTHEON_GIT_URL="{{ PANTHEON_GIT_URL }}"
- secure: bE9Qwgm4OnzsHCtE4WBiQWNYRCoG0pO2wC0tY2bu0RVJ+TJekZ2UBC2XAr6dsoFCAZE1nYN6VnRMYuUqXThRjlaLEY96L2I2XD3m7iZrOlDVVEWP0vnOZD892x4k/S/wpQFXYaQHSyikyyFfL5m3V0bIWjoweyON293q5494WKRnVrD5+uYGMdSLQmwF8lm/L/q3hlLpm8Ju63IM4WHAk0YY8Z/ASjCsKk/QGJTePU5OSjKO+NFLU49LRMPXjbWxWiz9leWNy0NP8St+7ONW/QX9QPRxiOoBGK+gzz3U0zGmAbF3mWNfTC1KRIsiA9vVI36pYAfA2n2Bv4Jz31ktUkTOCt6nvkpL4/4LcYcp8uymM0wW2+coaWlLBxRIrjz80XgtAr3ruy6ArC6BddOefYCxsw13Z2LseG88FmRy4VX/ypIj7h38wdhQZqgj6WsEmQR2tHO3mlXcd+ZL/LdFA181uQhOPuPWn5UYEgC3Rth2N3n2OXguzFizFA/XBbPmDlG/KUPcJX4suUzhawvaMS79XvUIVEYID8InoMzQs3VtqlGeOqYHbz4rjn7inpQgdLw6OdIssk6pp0nwqugiCPrMlLw3G3yiUwNQZ9jXR0UjhOXR40KIGbGwg0xbC/xtdQjM+76VEtnJmpQQcDxZ/ZmEbUK8xdOuss84LFJnVKw=
before_install:
- export PATH="$HOME/.config/composer/vendor/bin:$PATH"
- docker login --password "$DOCKER_PASSWORD" --username amitaibu
jobs:
include:
- stage: Lint
name: "PhpStan"
script:
- "composer install"
- "vendor/bin/phpstan analyse -c phpstan.neon"
- stage: Lint
name: "Drupal coding standard: phpcs"
script:
- "$TRAVIS_BUILD_DIR/ci-scripts/install_coder.sh || travis_terminate 1;"
- "export REVIEW_STANDARD=\"Drupal\" && $TRAVIS_BUILD_DIR/ci-scripts/test_coder.sh"
- stage: Lint
name: "Drupal coding best practices: phpcs"
script:
- "$TRAVIS_BUILD_DIR/ci-scripts/install_coder.sh || travis_terminate 1;"
- "export REVIEW_STANDARD=\"DrupalPractice\" && $TRAVIS_BUILD_DIR/ci-scripts/test_coder.sh"
- 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"
# Before auto-deploy gets configured, this will execute the tests always.
if: (branch != "{{ GITHUB_DEPLOY_BRANCH }}" AND tag IS blank) OR env(TERMINUS_TOKEN) IS blank
script:
- "$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;"
- stage: Deploy
name: "Backend tests: Functional tests and deploy to Pantheon"
# This will get activated using ddev robo deploy:config-autodeploy.
if: branch = "{{ GITHUB_DEPLOY_BRANCH }}" AND type = push AND env(TERMINUS_TOKEN) IS present
script:
- "$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 --no-interaction {{ PANTHEON_DEPLOY_BRANCH }}"