Skip to content

Commit

Permalink
Merge branch 'develop' into feature/12-phpcs-workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffpaul committed May 31, 2024
2 parents b0ee4fd + ba1b065 commit e35f8c8
Show file tree
Hide file tree
Showing 45 changed files with 5,530 additions and 107 deletions.
22 changes: 22 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Directories to ignore
/.git
/.github
/.wordpress-org
/node_modules
/tests
/vendor

# Files to ignore
/.*
/CHANGELOG.md
/CODE_OF_CONDUCT.md
/composer.json
/composer.lock
/CONTRIBUTING.md
/CREDITS.md
/LICENSE.md
/package-lock.json
/package.json
/phpcs-compat.xml
/phpcs.xml
/README.md
19 changes: 19 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/.github export-ignore
/.wordpress-org export-ignore
/node_modules export-ignore
/tests export-ignore
/vendor export-ignore

/.* export-ignore
/CHANGELOG.md export-ignore
/CODE_OF_CONDUCT.md export-ignore
/composer.json export-ignore
/composer.lock export-ignore
/CONTRIBUTING.md export-ignore
/CREDITS.md export-ignore
/LICENSE.md export-ignore
/package-lock.json export-ignore
/package.json export-ignore
/phpcs-compat.xml export-ignore
/phpcs.xml export-ignore
/README.md export-ignore
70 changes: 70 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: "\U0001F41B Bug report"
description: "Report a bug with this project."
labels: "type:bug"
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! Please fill in as much of the template below as you can.
- type: textarea
attributes:
label: Describe the bug
description: Please write a clear and concise description of the bug, including what you expect to happen and what is currently happening.
placeholder: |
Feature '...' is not working properly. I expect '...' to happen, but '...' happens instead
validations:
required: true

- type: textarea
attributes:
label: Steps to Reproduce
description: Please write the steps needed to reproduce the bug.
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
validations:
required: true

- type: textarea
attributes:
label: Screenshots, screen recording, code snippet
description: |
If possible, please upload a screenshot or screen recording which demonstrates the bug. You can use LIEcap to create a GIF screen recording: https://www.cockos.com/licecap/
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
For small snippets paste it directly here, or you can use GitHub Gist to share multiple code files: https://gist.github.com
Please ensure the shared code can be used by a developer to reproduce the issue—ideally it can be copied into a local development environment or executed in a browser console to help debug the issue
validations:
required: false

- type: textarea
attributes:
label: Environment information
placeholder: |
- Device: <!-- [e.g. MacBook] -->
- OS: <!-- [e.g. MacOS 10.14.3] -->
- Browser and version: <!-- [e.g. Firefox 65.0.1, Chrome 73.0.3683.75, Safari 12.0.3] -->
validations:
required: false

- type: textarea
attributes:
label: WordPress information
placeholder: |
<!-- If your WordPress version is below 5.2, then please provide your WordPress, Plugins, Themes versions here. -->
<!-- If your WordPress version is 5.2 or higher, then please fill out the Site Health Info details below. -->
<details><summary>Site Health info:</summary>
<!-- Go to Tools > Site Health > Info tab, click "Copy site info to clipboard", and paste those details here. -->
</details>
validations:
required: false

- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our `Code of Conduct` (see the `CODE_OF_CONDUCT.md` file in the repo).
options:
- label: I agree to follow this project's Code of Conduct
required: true
44 changes: 44 additions & 0 deletions .github/ISSUE_TEMPLATE/2-enhancement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "\U0001F680 Enhancement"
description: "Suggest an idea for this project."
labels: "type:enhancement"
body:
- type: markdown
attributes:
value: |
Thank you for suggesting an idea to make things better. Please fill in as much of the template below as you can.
- type: textarea
attributes:
label: Is your enhancement related to a problem? Please describe.
description: Please describe the problem you are trying to solve.
placeholder: |
I use this project as a `...` and I would like `...` so that `...describe benefit...`.
validations:
required: true

- type: textarea
attributes:
label: Designs
description: |
If applicable, add mockups/screenshots/etc. to help explain your idea.
Tip: You can attach images or videos by clicking this area to highlight it and then dragging files in.
validations:
required: false

- type: textarea
attributes:
label: Describe alternatives you've considered
description: |
Please describe alternative solutions or features you have considered.
placeholder: |
I have also considered `...describe alternative...`, however I feel that my solution described above is better because of `...reason...`.
validations:
required: false

- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our `Code of Conduct` (see the `CODE_OF_CONDUCT.md` file in the repo).
options:
- label: I agree to follow this project's Code of Conduct
required: true
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/3-help.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: "❓ Need help?"
description: "Ask us a question, we are here to help!"
labels: "type:question"
body:
- type: markdown
attributes:
value: |
If you have a question that is neither a bug report nor an enhancement, then please post it here! Please fill in as much of the template below as you can.
- type: textarea
attributes:
label: Describe your question
description: A clear and concise description of what your question is.
validations:
required: true

- type: checkboxes
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our `Code of Conduct` (see the `CODE_OF_CONDUCT.md` file in the repo).
options:
- label: I agree to follow this project's Code of Conduct
required: true
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: General support request
url: https://wordpress.org/support/plugin/mailchimp/
about: For general support requests, create a new topic in the WordPress.org support forum.
- name: Mailchimp Help Center
url: https://mailchimp.com/help/
about: Browse by topic or search by feature for 24/7 help with any stage of your business journey.
- name: Contact Mailchimp
url: https://mailchimp.com/contact/
about: To contact Mailchimp about a different topic, please use one of the methods listed here.
42 changes: 42 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!--
Filling out this template is required. Any PR that does not include enough information to be reviewed may be closed at a maintainers' discretion. All new code requires documentation and tests to ensure against regressions.
-->

### Description of the Change
<!--
We must be able to understand the design of your change from this description. The maintainer reviewing this PR may not have worked with this code recently, so please provide as much detail as possible.
Where possible, please also include:
- verification steps to ensure your change has the desired effects and has not introduced any regressions
- any benefits that will be realized
- any alternative implementations or possible drawbacks that you considered
- screenshots or screencasts
-->

<!-- Enter any applicable Issue number(s) here that will be closed/resolved by this PR. -->
Closes #

### How to test the Change
<!-- Please provide steps on how to test or validate that the change in this PR works as described. -->

### Changelog Entry
<!--
Please include a summary for this PR, noting whether this is something being Added / Changed / Deprecated / Removed / Fixed / or Security related. You can replace the sample entries after this comment block with the single changelog entry line for this PR. -->
> Added - New feature
> Changed - Existing functionality
> Deprecated - Soon-to-be removed feature
> Removed - Feature
> Fixed - Bug fix
> Security - Vulnerability
### Credits
<!-- Please list any and all contributors on this PR so that they can be added to this projects CREDITS.md file. -->
Props @username, @username2, ...

### Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you are unsure about any of these, please ask for clarification. We are here to help! -->
- [ ] I agree to follow this project's [**Code of Conduct**](https://github.com/mailchimp/wordpress/blob/develop/CODE_OF_CONDUCT.md).
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my change.
- [ ] All new and existing tests pass.
39 changes: 39 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Basic set up for three package managers
# - Disables version-updates

version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
# Disable version updates for GitHub Actions dependencies
open-pull-requests-limit: 0
labels:
- "changelog: none"
- "type: dependency"
- "github_actions"

# Maintain dependencies for npm
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
# Disable version updates for npm dependencies
open-pull-requests-limit: 0
labels:
- "changelog: none"
- "type: dependency"
- "javascript"

# Maintain dependencies for Composer
- package-ecosystem: 'composer'
directory: '/'
schedule:
interval: 'weekly'
# Disable version updates for Composer dependencies
open-pull-requests-limit: 0
labels:
- "changelog: none"
- "type: dependencies"
- "php"
22 changes: 22 additions & 0 deletions .github/workflows/build-release-zip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build release zip

on:
workflow_dispatch:
workflow_call:
push:
branches:
- main

jobs:
build:
name: Build release zip
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Generate ZIP file
uses: 10up/action-wordpress-plugin-build-zip@stable
env:
SLUG: mailchimp
61 changes: 61 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: E2E Cypress Tests

on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop

jobs:
cypress:
name: ${{ matrix.core.name }}
runs-on: ubuntu-latest
strategy:
matrix:
core:
- {name: 'WP latest', version: 'latest'}
- {name: 'WP minimum', version: 'WordPress/WordPress#6.0'}
- {name: 'WP trunk', version: 'WordPress/WordPress#master'}

steps:
- name: Checkout
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'

- name: Install dependencies
run: npm ci

- name: Set the core version
run: ./tests/bin/set-core-version.js ${{ matrix.core.version }}

- name: Set up WP environment
run: npm run env:start

- name: Test
run: npm run cypress:run

- name: Update summary
run: |
npx mochawesome-merge ./tests/cypress/reports/*.json -o tests/cypress/reports/mochawesome.json
rm -rf ./tests/cypress/reports/mochawesome-*.json
npx mochawesome-json-to-md -p ./tests/cypress/reports/mochawesome.json -o ./tests/cypress/reports/mochawesome.md
npx mochawesome-report-generator tests/cypress/reports/mochawesome.json -o tests/cypress/reports/
cat ./tests/cypress/reports/mochawesome.md >> $GITHUB_STEP_SUMMARY
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-artifact-mailchimp
retention-days: 7
path: |
${{ github.workspace }}/tests/cypress/screenshots/
${{ github.workspace }}/tests/cypress/videos/
${{ github.workspace }}/tests/cypress/logs/
${{ github.workspace }}/tests/cypress/reports/
Loading

0 comments on commit e35f8c8

Please sign in to comment.