Skip to content

Commit 288b98f

Browse files
authored
Merge pull request #20 from digitalutsc/feat/update-to-reusable-workflow-and-lint-codebase
feat: update to reusable CI and lint the codebase
2 parents e3f157d + 2e235b0 commit 288b98f

2 files changed

Lines changed: 9 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,8 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
build:
12-
runs-on: ubuntu-latest
13-
continue-on-error: false
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
php-versions: ["8.3", "8.4"]
18-
drupal-version: ["10.6", "11.3"]
19-
20-
name: PHP ${{ matrix.php-versions }} | Drupal ${{ matrix.drupal-version }}
21-
22-
steps:
23-
- name: Checkout code
24-
uses: actions/checkout@v5
25-
26-
- name: Create docker network
27-
run: docker network create ci-default
28-
29-
- name: PHPUnit tests
30-
run: |
31-
docker run \
32-
--rm \
33-
--name drupal \
34-
--hostname drupal \
35-
--volume $(pwd):/var/www/drupal/web/modules/contrib/$ENABLE_MODULES:ro \
36-
--env ENABLE_MODULES \
37-
--network ci-default \
38-
ghcr.io/islandora/ci:${{ matrix.drupal-version }}-php${{ matrix.php-versions }}
39-
env:
40-
ENABLE_MODULES: islandora_breadcrumbs
11+
islandora-module-ci:
12+
uses: digitalutsc/reusable_workflows/.github/workflows/islandora-module-ci.yml@main
13+
with:
14+
module_name: islandora_breadcrumbs
15+
install_chromedriver: false

src/IslandoraBreadcrumbBuilder.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ public function build(RouteMatchInterface $route_match) {
110110
elseif (isset($parameters['view_id'])) {
111111
$path = \Drupal::service('path.current')->getPath();
112112
$url_object = \Drupal::service('path.validator')->getUrlIfValid($path);
113+
// phpcs:ignore -- Unused variable $route_name.
113114
$route_name = $url_object->getRouteName();
114115
$title = '';
115116
$path_elements = explode('/', $path);
@@ -138,8 +139,9 @@ public function build(RouteMatchInterface $route_match) {
138139
}
139140
else {
140141
$this->setReferenceBreadcrumbs($breadcrumb, $node);
141-
$breadcrumb->addLink(Link::createFromRoute($title, 'entity.node.canonical', ['node' => $nid])); //updated for breadcrumb issue
142-
}
142+
// Updated for breadcrumb issue.
143+
$breadcrumb->addLink(Link::createFromRoute($title, 'entity.node.canonical', ['node' => $nid]));
144+
}
143145
}
144146
else {
145147
global $_islandora_breadcrumbs_isIslandora;

0 commit comments

Comments
 (0)