-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
config.yml
154 lines (144 loc) · 4.74 KB
/
config.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
defaults: &defaults
working_directory: ~/drush
resource_class: large
environment:
TZ: "/usr/share/zoneinfo/America/Los_Angeles"
TERM: dumb
SYMFONY_DEPRECATIONS_HELPER: disabled
PHPUNIT_ARGS: ""
PHP_SENDMAIL_PATH: /dev/null
requires: &requires
requires:
- check_mergable
- code_style
test_74_steps: &test74steps
steps:
- checkout
- run: cp .docker/zz-php.ini /usr/local/etc/php/conf.d/
- run: composer -n install
- run: mkdir -p /tmp/results
- run: composer -n lint
- run: composer -n unit -- --log-junit /tmp/results/unit.junit.xml
- run: composer -n functional -- --log-junit /tmp/results/functional.junit.xml
# @todo was getting missing key_value table failure when this comes before functional. See https://circleci.com/gh/drush-ops/drush/8828.
- run: composer -n integration -- --log-junit /tmp/results/integration.junit.xml
- store_test_results:
path: /tmp/results
- store_artifacts:
path: /tmp/results
version: 2.1
jobs:
# Code style test:
# FAIL if code does not conform to PSR-2 conventions
# PASS otherwise
code_style:
<<: *defaults
docker:
- image: wodby/php:7.4
steps:
- checkout
- run: cp .docker/zz-php.ini /usr/local/etc/php/conf.d/
- run: composer -n install
- run: composer -n cs
# Mergeable test:
# FAIL if merging test branch with 11.x produces conflicts
# PASS if the test branch is out of date, but mergeable without conflicts
check_mergable:
<<: *defaults
docker:
- image: circleci/buildpack-deps:buster
steps:
- checkout
- run: $HOME/drush/.circleci/mergable.sh
# PHP 7.4 test:
# Checks the most common configuration.
test_74_drupal9_mysql:
<<: *defaults
docker:
- image: wodby/php:7.4
environment:
- MYSQL_HOST=127.0.0.1
- UNISH_DB_URL=mysql://root:@127.0.0.1
- image: circleci/mysql:5.7.24
<<: *test74steps
test_74_drupal9_sqlite:
<<: *defaults
docker:
- image: wodby/php:7.4
environment:
- "UNISH_DB_URL=sqlite://:memory:"
<<: *test74steps
test_74_drupal9_postgres:
<<: *defaults
docker:
- image: wodby/php:7.4
environment:
- UNISH_DB_URL=pgsql://unish:unish@127.0.0.1
- image: wodby/postgres:10.5
environment:
POSTGRES_PASSWORD: unish
POSTGRES_DB: unish_dev
POSTGRES_USER: unish
<<: *test74steps
# Drupal 9.2.8 for Security test coverage for drupal/core
test_74_drupal92_security:
<<: *defaults
docker:
- image: wodby/php:7.4
environment:
- MYSQL_HOST=127.0.0.1
- UNISH_DB_URL=mysql://root:@127.0.0.1
- image: circleci/mysql:5.7.24
steps:
- checkout
- run: cp .docker/zz-php.ini /usr/local/etc/php/conf.d/
- run: composer -n require --dev drupal/core-recommended:9.2.8 --no-update
- run: composer -n require symfony/polyfill-php80:"1.23 as 1.20" --no-update
- run: php --version
- run: composer -n update
- run: composer -n phpunit -- --testsuite integration --filter=testInsecureDrupalPackage --stop-on-skipped
# PHP 8 test with Drupal tip
# Determines whether a newer version of a dependency has broken Drush.
test_81_drupal10_highest:
<<: *defaults
docker:
- image: wodby/php:latest
environment:
- MYSQL_HOST=127.0.0.1
- UNISH_DB_URL=mysql://root:@127.0.0.1
- image: circleci/mysql:5.7.24
steps:
- checkout
- run: cp .docker/zz-php.ini /usr/local/etc/php/conf.d/
- run: php --version
- run: composer -n config platform.php --unset
- run: composer -n require --dev drupal/core-recommended:10.0.x-dev --no-update
# Bring it back when it is compatible with Drupal 10.
- run: composer -n remove drupal/semver_example --no-update --dev
- run: composer -n update
- run: mkdir -p /tmp/results
- run: composer -n lint
- run: composer -n unit -- --log-junit /tmp/results/unit.junit.xml
- run: composer -n functional -- --log-junit /tmp/results/functional.junit.xml
- run: composer -n integration -- --log-junit /tmp/results/integration.junit.xml
- store_test_results:
path: /tmp/results
- store_artifacts:
path: /tmp/results
workflows:
version: 2
drush:
jobs:
- code_style
- check_mergable
- test_74_drupal92_security:
<<: *requires
- test_74_drupal9_mysql:
<<: *requires
- test_81_drupal10_highest:
<<: *requires
- test_74_drupal9_sqlite:
<<: *requires
- test_74_drupal9_postgres:
<<: *requires