Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin authored Oct 22, 2023
2 parents 14813c4 + f8a8aed commit 1e77742
Show file tree
Hide file tree
Showing 45 changed files with 4,116 additions and 3,907 deletions.
3 changes: 2 additions & 1 deletion .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": ["@commitlint/config-conventional"]
"extends": ["@commitlint/config-conventional"],
"helpUrl": "https://github.com/chapter-three/next-drupal/blob/main/CONTRIBUTING.md#commits"
}
65 changes: 65 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Useful docs:
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema

name: Bug Report
description: File a bug report
labels: ["bug", "triage"]
body:
- type: dropdown
id: package
attributes:
label: Package containing the bug
description: What package in this monorepo has the bug?
options:
- Not package-specific
- I’m not sure
- next (Drupal module)
- next-drupal (NPM package)
- basic-starter
- graphql-starter
- example-auth
- example-blog
- example-client
- example-custom-auth
- example-custom-cache
- example-custom-fetcher
- example-custom-serializer
- example-graphql
- example-marketing
- example-query
- example-search-api
- example-umami
- example-webform
default: 1
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe the bug
value: |
A clear and concise description of what the bug is.
If applicable, add screenshots to help explain your problem.
### Expected behavior
A clear and concise description of what you expected to happen.
### Steps to reproduce:
1. First '...'
2. Then '....'
3. 😢
### Additional context
Add any other context about the problem here.
validations:
required: true
- type: markdown
attributes:
value: |
<p align="right"><em><strong>Thanks</strong> for taking the time to fill out this bug report!</em></p>
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Feature Request
description: Suggest an idea for this project
labels: ["enhancement", "triage"]
body:
- type: dropdown
id: package
attributes:
label: Package
description: The feature request is for what package in this monorepo?
options:
- Not package-specific
- I’m not sure
- next (Drupal module)
- next-drupal (NPM package)
- basic-starter
- graphql-starter
- example-auth
- example-blog
- example-client
- example-custom-auth
- example-custom-cache
- example-custom-fetcher
- example-custom-serializer
- example-graphql
- example-marketing
- example-query
- example-search-api
- example-umami
- example-webform
default: 1
validations:
required: true
- type: textarea
id: description
attributes:
label: Describe the feature request
value: |
A clear and concise description of what the request is. If your feature request is related to a problem, please describe it.
If applicable, add screenshots to help explain your issue.
### Describe the solution you'd like
### Describe alternatives you've considered
### Additional context
Add any other context about the problem here.
validations:
required: true
- type: markdown
attributes:
value: |
<p align="right"><em><strong>Thanks</strong> for taking the time to fill out this feature request!</em></p>
50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Question
description: Ask a question or make a support request
labels: ["question", "triage"]
body:
- type: dropdown
id: package
attributes:
label: Package
description: The question is for what package in this monorepo?
options:
- Not package-specific
- I’m not sure
- next (Drupal module)
- next-drupal (NPM package)
- basic-starter
- graphql-starter
- example-auth
- example-blog
- example-client
- example-custom-auth
- example-custom-cache
- example-custom-fetcher
- example-custom-serializer
- example-graphql
- example-marketing
- example-query
- example-search-api
- example-umami
- example-webform
default: 1
validations:
required: true
- type: textarea
id: description
attributes:
label: Ask the question
value: |
A clear and concise description of what the question is.
If applicable, add screenshots to help explain your issue.
### Additional context
Add any other context about the question here.
validations:
required: true
- type: markdown
attributes:
value: |
<p align="right"><em><strong>Thanks</strong> for taking the time to fill out this request form!</em></p>
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
This pull request is for: (mark with an "x")
- [ ] `examples/*`
- [ ] `modules/next`
- [ ] `packages/next-drupal`
- [ ] `starters/basic-starter`
- [ ] `starters/graphql-starter`
- [ ] Other

GitHub Issue: #
_Please add a link to the GitHub issue
where this problem is discussed._

- [ ] I need help adding tests. (mark with an "x")
_Code changes need test coverage. If you don't know
how to make tests, check this box to ask for help._

## Describe your changes

A clear and concise description of what the request is.

If applicable, add screenshots to help explain your issue.
2 changes: 1 addition & 1 deletion .github/workflows/next-drupal-query.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install modules
run: yarn
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/next-drupal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: ["8.0", "8.1"]
drupal: ["9.3", "9.4", "10.0.0-rc1"]
# Supported PHP versions: https://www.drupal.org/docs/getting-started/system-requirements/php-requirements
php: ["8.0", "8.1", "8.2"]
# Supported Drupal versions: https://www.drupal.org/project/drupal
drupal: ["9.5", "10.0"]
exclude:
- php: "8.0"
drupal: "10.0.0-rc1"
- drupal: "9.5"
php: "8.2"
- drupal: "10.0"
php: "8.0"
name: Drupal ${{ matrix.drupal }} - PHP ${{ matrix.php }}
services:
mysql:
Expand All @@ -26,7 +30,7 @@ jobs:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
Expand All @@ -37,17 +41,17 @@ jobs:
id: composercache
run: |
cd modules/next
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v3
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.drupal }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
restore-keys: ${{ runner.os }}-${{ matrix.drupal }}-composer-
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Setup Drupal
run: |
COMPOSER_MEMORY_LIMIT=-1 composer create-project drupal/recommended-project:${{ matrix.drupal }} ~/drupal --no-interaction --no-install
COMPOSER_MEMORY_LIMIT=-1 composer create-project drupal/recommended-project:${{ matrix.drupal }}.x ~/drupal --no-interaction --no-install
cd ~/drupal
composer config extra.enable-patching true
composer config extra.compile-mode all
Expand All @@ -57,22 +61,20 @@ jobs:
composer config repositories.0 path $GITHUB_WORKSPACE
composer config repositories.1 composer https://packages.drupal.org/8
composer config allow-plugins true -n
COMPOSER_MEMORY_LIMIT=-1 composer require drupal/core-dev:${{ matrix.drupal }} --no-suggest --no-install
COMPOSER_MEMORY_LIMIT=-1 composer require drupal/core-dev --no-install
composer install
- name: Add phpspec/prophecy-phpunit
run: |
cd ~/drupal
COMPOSER_MEMORY_LIMIT=-1 composer require --dev phpspec/prophecy-phpunit:^2 -W
if: ${{ startsWith(matrix.drupal, '9') }}
- name: Run phpcs
run: |
~/drupal/vendor/bin/phpcs -p -s --colors --standard=modules/next/phpcs.xml modules/next
- name: Copy module
run: cp -R ../next-drupal/modules/next ~/drupal/web/modules/next
- name: Run php built-in server
run: php -S 127.0.0.1:8080 -t ~/drupal/web &
- name: Run phpcs
run: |
cd ~/drupal/web
cp modules/next/phpcs.xml.dist .
../vendor/bin/phpcs --standard=./phpcs.xml.dist modules/next -p -s -n --colors
- name: Run PHPUnit
run: |
cd ~/drupal/web
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
environment: Preview
steps:
- name: Init
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Node
Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commitlint --edit $1
npx --no -- commitlint --edit ${1}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16
Loading

0 comments on commit 1e77742

Please sign in to comment.