Skip to content

Commit

Permalink
Merge pull request #21 from antistatique/2-0-x/support-drupal-95
Browse files Browse the repository at this point in the history
  • Loading branch information
WengerK authored Oct 18, 2022
2 parents 004b6a3 + 58fdeec commit fa3903e
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 21 deletions.
40 changes: 35 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:

strategy:
matrix:
drupal_version: ['8.8', '8.9', '9.0', '9.1', '9.2']
drupal_version: ['9.0', '9.1', '9.2', '9.3', '9.4', '9.5']
module: ['nbsp']
experimental: [ false ]
include:
- drupal_version: '9.3'
- drupal_version: '9.5'
module: 'nbsp'
experimental: true

Expand All @@ -43,16 +43,16 @@ jobs:

strategy:
matrix:
drupal_version: ['8.8', '8.9', '9.0', '9.1', '9.2']
drupal_version: ['9.0', '9.1', '9.2', '9.3', '9.4', '9.5']
module: [ 'nbsp' ]
experimental: [ false ]
include:
- drupal_version: '9.3'
- drupal_version: '9.5'
module: 'nbsp'
experimental: true

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- run: docker-compose -f docker-compose.yml pull --include-deps drupal
- name: Build the docker-compose stack
run: docker-compose -f docker-compose.yml build --pull --build-arg BASE_IMAGE_TAG=${{ matrix.drupal_version }} drupal
Expand All @@ -72,3 +72,33 @@ jobs:
run: docker-compose -f docker-compose.yml exec -T -u www-data drupal phpunit --no-coverage --group=${{ matrix.module }}_functional --configuration=/var/www/html/phpunit.xml --fail-on-risky
continue-on-error: ${{ matrix.experimental }}

upgrade-status:
name: Upgrade Status
runs-on: ubuntu-latest

strategy:
matrix:
drupal_version: ['9.4']
module: ['nbsp']

steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- run: docker-compose -f docker-compose.yml pull --include-deps drupal
- name: Build the docker-compose stack
run: docker-compose -f docker-compose.yml build --pull --build-arg BASE_IMAGE_TAG=${{ matrix.drupal_version }} drupal
- name: Up a persistent Docker Container
run: docker-compose -f docker-compose.yml up -d drupal
- name: Add upgrade status dependency
run: docker-compose exec -T drupal wait-for-it db:3306 -- composer require --dev drupal/upgrade_status --no-interaction
- name: Bootstrap Drupal
run: docker-compose -f docker-compose.yml exec -T -u www-data drupal drush site-install standard --db-url="mysql://drupal:drupal@db/drupal" -y
- name: Enable upgrade status
run: docker-compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush en upgrade_status -y
- name: Disable incompatible module
run: docker-compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush pmu page_cache -y
- name: Enable the module
run: docker-compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush en ${{ matrix.module }} -y
- name: Run upgrade status
run: docker-compose exec -T drupal wait-for-it db:3306 -- ./vendor/bin/drush upgrade_status:analyze ${{ matrix.module }}
18 changes: 9 additions & 9 deletions .github/workflows/styles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install modules
run: yarn
- name: Run ESLint
Expand All @@ -16,7 +16,7 @@ jobs:
name: prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install modules
run: yarn
- name: Run Prettier
Expand All @@ -29,10 +29,10 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '7.4'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: cs2pr, composer:v1
- uses: actions/checkout@master
- uses: actions/checkout@v3
- run: composer install --prefer-dist
- run: ./vendor/bin/phpcs ./ --report=checkstyle | cs2pr

Expand All @@ -43,10 +43,10 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '7.4'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: cs2pr, composer:v1, phpmd
- uses: actions/checkout@master
- uses: actions/checkout@v3
- run: composer install --prefer-dist
- run: phpmd ./ text ./phpmd.xml --suffixes php,module,inc,install,test,profile,theme,css,info,txt --exclude *Test.php,*vendor/*

Expand All @@ -57,18 +57,18 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.3'
php-version: '7.4'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
tools: cs2pr, composer:v1, phpcpd
- uses: actions/checkout@master
- uses: actions/checkout@v3
- run: composer install --prefer-dist
- run: phpcpd ./src --suffix .php --suffix .module --suffix .inc --suffix .install --suffix .test --suffix .profile --suffix .theme --suffix .css --suffix .info --suffix .txt --exclude *.md --exclude *.info.yml --exclude tests --exclude vendor/

phpdd:
name: PhpDeprecationDetector (phpdd)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- run: docker-compose -f docker-compose.yml pull --include-deps drupal
- name: Build the docker-compose stack
run: docker-compose -f docker-compose.yml build drupal
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- add dependabot for GitHub Action dependency
- add upgrade-status check
- add coverage for Drupal 9.3, 9.4 & 9.5

### Changed
- disable deprecation notice PHPUnit
- update changelog form to follow keep-a-changelog format
- drop support of drupal 8.8 & 8.9

### Removed
- remove satackey/action-docker-layer-caching on Github Actions
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE_TAG=8.9
ARG BASE_IMAGE_TAG=9.0
FROM wengerk/drupal-for-contrib:${BASE_IMAGE_TAG}

# Disable deprecation notice because supporting both Drupal 8 & Drupal 9.
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ The version `8.x-1.x` is not compatible with Drupal `8.8.x`.
Drupal `8.8.x` brings some breaking change with tests and so you
must upgrade to `8.x-2.x` version of **NBSP**.

The version `8.x-3.x` is not compatible with Drupal `8.x` and will only support Drupal `9.x` Drupal `10.x`.

## Which version should I use?

|Drupal Core|NBSP |
|:---------:|:----------:|
|8.7.x |1.x |
|8.8.x |2.x |
|9.x |2.x |
|Drupal Core| NBSP |
|:---------:|:---------:|
|8.7.x | 1.x |
|8.8.x | 2.x |
|9.x | 2.x - 3.x |

## Dependencies

Expand Down
2 changes: 1 addition & 1 deletion nbsp.info.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 'CKEditor Non-breaking space Plugin'
type: module
description: 'Minimal module to insert a non-breaking space into the content by pressing Ctrl+Space or using the provided button.'
core_version_requirement: ^8.8 || ^9
core_version_requirement: ^9
package: CKEditor

dependencies:
Expand Down

0 comments on commit fa3903e

Please sign in to comment.