Skip to content

Commit 412abab

Browse files
authored
Merge pull request #88 from localgovdrupal/2.x
release 2.0.9
2 parents da8702d + 206e7fd commit 412abab

File tree

5 files changed

+62
-75
lines changed

5 files changed

+62
-75
lines changed

.github/workflows/test.yml

+55-28
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
name: Test LocalGov Drupal Subsites
1+
##
2+
# Managed by https://github.com/localgovdrupal/github_workflow_manager
3+
---
4+
name: Test localgovdrupal/localgov_subsites drupal-module
25

36
on:
47
push:
@@ -8,6 +11,10 @@ on:
811
branches:
912
- '2.x'
1013

14+
env:
15+
LOCALGOV_DRUPAL_PROJECT: localgovdrupal/localgov_subsites
16+
LOCALGOV_DRUPAL_PROJECT_PATH: web/modules/contrib/localgov_subsites
17+
1118
jobs:
1219

1320
build:
@@ -17,10 +24,13 @@ jobs:
1724
strategy:
1825
fail-fast: false
1926
matrix:
20-
include:
21-
- localgov-version: "2.x"
22-
drupal-version: "~9.1"
23-
php-version: "7.4"
27+
localgov-version:
28+
- '2.x'
29+
drupal-version:
30+
- '~9.3'
31+
php-version:
32+
- '7.4'
33+
- '8.1'
2434

2535
steps:
2636

@@ -29,14 +39,15 @@ jobs:
2939
run: |
3040
echo "GIT_BASE=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
3141
echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
32-
echo "GIT_REPO=${GITHUB_REPOSITORY}" >> $GITHUB_ENV
42+
echo "HEAD_USER=localgovdrupal" >> $GITHUB_ENV
3343
3444
- name: Save git branch and git repo names to env if this is a pull request
3545
if: github.event_name == 'pull_request'
3646
run: |
3747
echo "GIT_BASE=${GITHUB_BASE_REF}" >> $GITHUB_ENV
3848
echo "GIT_BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
39-
echo "GIT_REPO=${{ github.event.pull_request.head.repo.full_name }}" >> $GITHUB_ENV
49+
export HEAD="${{ github.event.pull_request.head.label }}"
50+
echo "HEAD_USER=${HEAD%%:*}" >> $GITHUB_ENV
4051
4152
- name: Set composer branch reference for version branches
4253
if: endsWith(github.ref, '.x')
@@ -76,11 +87,18 @@ jobs:
7687
composer --working-dir=./html require --no-install drupal/core-recommended:${{ matrix.drupal-version }} drupal/core-composer-scaffold:${{ matrix.drupal-version }} drupal/core-project-message:${{ matrix.drupal-version }} drupal/core-dev:${{ matrix.drupal-version }}
7788
composer --working-dir=./html install
7889
79-
- name: Obtain the test target from the repo that triggered this workflow
90+
- name: Obtain the test target using Composer
91+
if: env.HEAD_USER == 'localgovdrupal'
8092
run: |
81-
composer --working-dir=html config repositories.1 vcs [email protected]:${GIT_REPO}.git
93+
composer --working-dir=html config repositories.1 vcs [email protected]:${LOCALGOV_DRUPAL_PROJECT}.git
8294
composer global config github-oauth.github.com ${{ github.token }}
83-
composer --working-dir=./html require --with-all-dependencies localgovdrupal/${{ github.event.repository.name }}:"${COMPOSER_REF} as ${LATEST_RELEASE}"
95+
composer --working-dir=./html require --with-all-dependencies ${LOCALGOV_DRUPAL_PROJECT}:"${COMPOSER_REF} as ${LATEST_RELEASE}"
96+
97+
- name: Obtain the test target using Git
98+
if: env.HEAD_USER != 'localgovdrupal'
99+
uses: actions/checkout@v2
100+
with:
101+
path: ${{ env.LOCALGOV_DRUPAL_PROJECT_PATH }}
84102

85103
phpcs:
86104
name: Coding standards checks
@@ -90,10 +108,13 @@ jobs:
90108
strategy:
91109
fail-fast: false
92110
matrix:
93-
include:
94-
- localgov-version: "2.x"
95-
drupal-version: "~9.1"
96-
php-version: "7.4"
111+
localgov-version:
112+
- '2.x'
113+
drupal-version:
114+
- '~9.3'
115+
php-version:
116+
- '7.4'
117+
- '8.1'
97118

98119
steps:
99120

@@ -108,12 +129,12 @@ jobs:
108129
- name: Setup PHP
109130
uses: shivammathur/setup-php@v2
110131
with:
111-
php-version: '7.4'
132+
php-version: ${{ matrix.php-version }}
112133

113134
- name: Run coding standards checks
114135
run: |
115136
cd html
116-
./bin/phpcs -p
137+
./bin/phpcs -p ${LOCALGOV_DRUPAL_PROJECT_PATH}
117138
118139
phpstan:
119140
name: Deprecated code checks
@@ -123,10 +144,13 @@ jobs:
123144
strategy:
124145
fail-fast: false
125146
matrix:
126-
include:
127-
- localgov-version: "2.x"
128-
drupal-version: "~9.1"
129-
php-version: "7.4"
147+
localgov-version:
148+
- '2.x'
149+
drupal-version:
150+
- '~9.3'
151+
php-version:
152+
- '7.4'
153+
- '8.1'
130154

131155
steps:
132156

@@ -141,13 +165,12 @@ jobs:
141165
- name: Setup PHP
142166
uses: shivammathur/setup-php@v2
143167
with:
144-
php-version: '7.4'
168+
php-version: ${{ matrix.php-version }}
145169

146170
- name: Run deprecated code checks
147171
run: |
148172
cd html
149-
./bin/phpstan analyse -c ./phpstan.neon ./web/profiles/contrib/localgov/ ./web/modules/contrib/localgov_*
150-
173+
./bin/phpstan analyse -c ./phpstan.neon ${LOCALGOV_DRUPAL_PROJECT_PATH}
151174
phpunit:
152175
name: PHPUnit tests
153176
needs: build
@@ -156,10 +179,13 @@ jobs:
156179
strategy:
157180
fail-fast: false
158181
matrix:
159-
include:
160-
- localgov-version: "2.x"
161-
drupal-version: "~9.1"
162-
php-version: "7.4"
182+
localgov-version:
183+
- '2.x'
184+
drupal-version:
185+
- '~9.3'
186+
php-version:
187+
- '7.4'
188+
- '8.1'
163189

164190
steps:
165191

@@ -183,5 +209,6 @@ jobs:
183209
- name: Run PHPUnit tests
184210
run: |
185211
mkdir -p ./html/web/sites/simpletest && chmod 777 ./html/web/sites/simpletest
212+
sed -i "s#http://localgov.lndo.site#http://drupal#" ./html/phpunit.xml.dist
186213
docker exec -t drupal bash -c 'chown docker:docker -R /var/www/html'
187-
docker exec -u docker -t drupal bash -c "cd /var/www/html && ./bin/paratest --processes=4"
214+
docker exec -u docker -t drupal bash -c "cd /var/www/html && ./bin/paratest --processes=4 ${{ env.LOCALGOV_DRUPAL_PROJECT_PATH }}"

modules/localgov_subsites_paragraphs/css/localgov-accordion.css

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
* Basic styling for Accordion paragraph.
44
*/
55

6+
.accordion-pane__title button {
7+
width: 100%;
8+
text-align: left;
9+
}
10+
611
.accordion--initialised .accordion-pane__content {
712
display: none;
813
}

modules/localgov_subsites_paragraphs/localgov_subsites_paragraphs.libraries.yml

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ localgov_accordion:
99
css/localgov-accordion.css: {}
1010
js:
1111
js/localgov-accordion.js: {}
12+
dependencies:
13+
- core/drupal
1214

1315
localgov_box_links_listing:
1416
css:

modules/localgov_subsites_paragraphs/localgov_subsites_paragraphs.module

-4
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,6 @@ function localgov_subsites_paragraphs_theme($existing, $type, $theme, $path) {
101101
'template' => 'paragraph--localgov-tab-panel',
102102
'base hook' => 'paragraph',
103103
],
104-
'paragraph__localgov_video' => [
105-
'template' => 'paragraph--localgov-video',
106-
'base hook' => 'paragraph',
107-
],
108104
];
109105
}
110106

modules/localgov_subsites_paragraphs/templates/paragraph--localgov-video.html.twig

-43
This file was deleted.

0 commit comments

Comments
 (0)