Skip to content

Commit 9ebc773

Browse files
authoredJan 29, 2021
Updated circleci testing (#111)
1 parent 265d0cc commit 9ebc773

File tree

4 files changed

+39
-27
lines changed

4 files changed

+39
-27
lines changed
 

‎.circleci/config.yml

+27-10
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version: 2
55
defaults: &defaults
66
docker:
77
- image: pookmish/drupal8ci:pcov
8-
- image: selenium/standalone-chrome:3.141.59-neon
8+
- image: selenium/standalone-chrome:latest
99
- image: mariadb:10.3
1010
environment:
1111
MYSQL_ALLOW_EMPTY_PASSWORD: 1
@@ -23,7 +23,7 @@ code_coverage: &code_coverage
2323
- run:
2424
name: Run PHP Unit Coverage Tests
2525
command: |
26-
composer global require SU-SWS/stanford-caravan:dev-8.x-1.x
26+
composer global require SU-SWS/stanford-caravan:dev-8.x-2.x
2727
~/.composer/vendor/bin/sws-caravan phpunit /var/www/html --extension-dir=/var/www/test --with-coverage
2828
- save_cache:
2929
key: dependencies-v1-{{ epoch }}
@@ -41,16 +41,16 @@ back_to_dev: &back_to_dev
4141
- run:
4242
name: Back to dev
4343
command: |
44-
composer global require SU-SWS/stanford-caravan:dev-8.x-1.x
44+
composer global require SU-SWS/stanford-caravan:dev-8.x-2.x
4545
~/.composer/vendor/bin/sws-caravan back-to-dev ${CIRCLE_TAG} ${CIRCLE_WORKING_DIRECTORY}
4646
47-
codeception: &codeception
47+
d8_codeception: &d8_codeception
4848
<<: *defaults
4949
steps:
5050
- checkout:
5151
path: /var/www/test
5252
- run:
53-
name: Run Acceptance Tests
53+
name: Run Codeception Tests
5454
command: |
5555
composer global require SU-SWS/stanford-caravan:dev-8.x-1.x
5656
~/.composer/vendor/bin/sws-caravan codeception /var/www/html --extension-dir=/var/www/test
@@ -59,14 +59,31 @@ codeception: &codeception
5959
- store_artifacts:
6060
path: /var/www/html/artifacts
6161

62+
d9_codeception: &d9_codeception
63+
<<: *defaults
64+
steps:
65+
- checkout:
66+
path: /var/www/test
67+
- run:
68+
name: Run Codeception Tests
69+
command: |
70+
composer global require SU-SWS/stanford-caravan:dev-8.x-2.x
71+
~/.composer/vendor/bin/sws-caravan codeception /var/www/html --extension-dir=/var/www/test
72+
- store_test_results:
73+
path: /var/www/html/artifacts/behat
74+
- store_artifacts:
75+
path: /var/www/html/artifacts
76+
6277
# Declare all of the jobs we should run.
6378
jobs:
6479
run-coverage:
6580
<<: *code_coverage
6681
run-back-to-dev:
6782
<<: *back_to_dev
68-
run-codeception:
69-
<<: *codeception
83+
run-d8-codeception:
84+
<<: *d8_codeception
85+
run-d9-codeception:
86+
<<: *d9_codeception
7087

7188
# Declare a workflow that runs all of our jobs in parallel.
7289
workflows:
@@ -84,16 +101,16 @@ workflows:
84101
tests:
85102
jobs:
86103
- run-coverage
87-
- run-codeception
104+
- run-d8-codeception
105+
- run-d9-codeception
88106
# Re-test every sunday in case this code becomes stale.
89107
sundays:
90108
jobs:
91109
- run-coverage
92-
- run-codeception
93110
triggers:
94111
- schedule:
95112
cron: "0 0 * * 0"
96113
filters:
97114
branches:
98115
only:
99-
- 8.x-2.x
116+
- 8.x-1.x

‎composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
],
7676
"require": {
7777
"drupal/allowed_formats": "^1.2",
78-
"drupal/auto_entitylabel": "3.x-dev#1dd28579f4559cc03d09ab20143b1feb48644fac",
78+
"drupal/auto_entitylabel": "^3.0",
7979
"drupal/ctools": "^3.4",
8080
"drupal/default_content": "^2.0",
8181
"drupal/ds": "^3.5",
@@ -86,11 +86,11 @@
8686
"drupal/field_group": "^3.0",
8787
"drupal/layout_builder_restrictions": "^2.7",
8888
"drupal/menu_block": "^1.6",
89-
"drupal/page_manager": "dev-4.x#78b492786c841c5d2eb07f6d977275a76b79e46f",
89+
"drupal/page_manager": "^4.0",
9090
"drupal/paragraphs": "^1.11",
9191
"drupal/pathauto": "^1.8",
9292
"drupal/rabbit_hole": "^1.0-beta6",
93-
"drupal/taxonomy_menu": "dev-3.x#c0892fa9b428ceb784876554c9b80f49d72a246f",
93+
"drupal/taxonomy_menu": "dev-3.x",
9494
"drupal/views_block_filter_block": "^1.0",
9595
"drupal/views_infinite_scroll": "^1.6",
9696
"drupal/views_taxonomy_term_name_depth": "^7.0",

‎stanford_news.module

+9-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ function stanford_news_theme() {
2525
'template' => 'field/field--node--su-news-topics',
2626
'base hook' => 'field',
2727
],
28-
'field__node__su_news_dek' => [
29-
'template' => 'field/field--node--su-news-dek--stanford-news',
30-
'base hook' => 'field',
31-
],
3228
'signup_block' => [
3329
'variables' => [
3430
'form_action' => NULL,
@@ -42,6 +38,15 @@ function stanford_news_theme() {
4238
];
4339
}
4440

41+
/**
42+
* Implements hook_preprocess_HOOK().
43+
*/
44+
function stanford_news_preprocess_field__su_news_dek(&$variables) {
45+
$variables['attributes']['class'][] = 'flex-12-of-12';
46+
$variables['attributes']['class'][] = 'flex-md-10-of-12';
47+
$variables['attributes']['class'][] = 'flex-xl-7-of-12';
48+
}
49+
4550
/**
4651
* Implements hook_preprocess_block().
4752
*/

‎templates/field/field--node--su-news-dek--stanford-news.html.twig

-10
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.