generated from druxt/quickstart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
174 lines (140 loc) · 4.63 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
version: 2.1
defaults: &defaults
working_directory: ~/repo
jobs:
build:
<<: *defaults
docker:
- image: php:8.3
steps:
- checkout
- run:
name: Install dependencies
command: |
apt-get update -yqq
apt-get install -yqq git libpq-dev libcurl4-gnutls-dev libicu-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev libonig-dev libzip-dev nodejs
# Install PHP extensions
docker-php-ext-install mbstring pdo_pgsql curl intl gd xml zip bz2 opcache
# Install Composer
curl -sS https://getcomposer.org/installer | php
# Install NVM and Yarn
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$HOME/.nvm" && . "$NVM_DIR/nvm.sh" --no-use
nvm install && nvm use
npm install --global yarn
- run:
name: Validate and build composer packages
command: |
cd drupal && php ../composer.phar validate && php ../composer.phar install
# @TODO - Circle not seeing NPM
# - run:
# name: Install and build Nuxt
# command: |
# which npm
# cd nuxt && npm install && NUXT_TELEMETRY_DISABLED=1 npm run build
# - run:
# name: Install Codecov
# command: cd nuxt && yarn add codecov
- restore_cache:
keys:
- v1-dependencies-{{ checksum "drupal/composer.json" }}-{{ checksum "nuxt/package.json" }}
# fallback to using the latest cache if no exact match is found.
- v1-dependencies-
# - save_cache:
# paths:
# - drupal/vendor
# - nuxt/node_modules
# key: v1-dependencies-{{ checksum "drupal/composer.json" }}-{{ checksum "nuxt/package.json" }}
- persist_to_workspace:
root: ~/repo
paths:
- .
# lint:
# <<: *defaults
# steps:
# - attach_workspace:
# at: ~/repo
# - run:
# name: Run lint
# command: yarn lint --format ./node_modules/eslint-junit/index.js
# environment:
# ESLINT_JUNIT_OUTPUT: ./reports/junit/eslint.xml
# - run:
# name: Renovate config validator
# command: yarn lint:renovate
# - run:
# name: Bundlewatch
# command: yarn bundlewatch
# test_unit:
# <<: *defaults
# steps:
# - attach_workspace:
# at: ~/repo
# - run:
# name: Run unit tests
# command: yarn test:unit --reporters=jest-junit --runInBand
# environment:
# JEST_JUNIT_OUTPUT_DIR: ./reports/junit/
# NODE_OPTIONS: --max_old_space_size=8192
# - run:
# name: Upload coverage report
# command: yarn dlx codecov
# - store_test_results:
# path: ./reports/junit/
# - store_artifacts:
# path: ./reports/junit
test_e2e:
machine:
image: ubuntu-2004:2022.07.1
working_directory: ~/repo
environment:
DDEV_NONINTERACTIVE: "true"
steps:
- attach_workspace:
at: ~/repo
- run:
name: Install ddev
command: |
curl -LO https://raw.githubusercontent.com/drud/ddev/master/scripts/install_ddev.sh && bash install_ddev.sh
- run:
name: Setup .env
command: cp .env.example .env
- run:
name: Start server running
command: |
cd drupal && ddev start -y
- run:
name: Install Drupal
command: |
cd drupal && ddev drupal-install
- run:
name: Install cypress
command: npx cypress install
- run:
name: Run end-to-end tests
command: cd nuxt && npm run test:e2e
# - store_artifacts:
# path: ./examples/druxt-site/test/cypress/screenshots
# - store_artifacts:
# path: ./examples/druxt-site/test/cypress/videos
# - run:
# name: Run DruxtJS.org end-to-end tests
# command: yarn docs:test
# - store_artifacts:
# path: ./docs/nuxt/test/cypress/screenshots
# - store_artifacts:
# path: ./docs/nuxt/test/cypress/videos
workflows:
version: 2
build_test:
jobs:
- build
# - lint:
# requires:
# - build
# - test_unit:
# requires:
# - build
# - test_e2e:
# requires:
# - build