Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Sep 13, 2023
2 parents 95699d0 + 7405ae4 commit f71cfdb
Show file tree
Hide file tree
Showing 26 changed files with 978 additions and 3,998 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ insert_final_newline = true
[*.{js,json}]
charset = utf-8
indent_style = space
indent_size = 4
indent_size = 2

# Matches the exact files either package.json or .travis.yml
[*{yml}]
Expand Down
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# These owners will be the default owners for everything in the repo. Unless a later match takes precedence, @10up/open-source-practice, as primary maintainers will be requested for review when someone opens a Pull Request.
* @10up/open-source-practice

# GitHub and WordPress.org specifics
/.github/ @jeffpaul
CODE_OF_CONDUCT.md @jeffpaul
LICENSE.md @jeffpaul
65 changes: 65 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<!--
### Requirements
Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the 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. If we can't get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion. Also including any benefits that will be realized by the code change will be helpful. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code here recently, so please walk us through the concepts. Please include screenshots (if appropriate).
-->

<!-- Enter any applicable Issues here. Example: -->
Closes #

### Alternate Designs

<!-- Explain what other alternates were considered and why the proposed version was selected. -->

### Possible Drawbacks

<!-- What are the possible side-effects or negative impacts of the code change? -->

### Verification Process

<!--
What process did you follow to verify that your change has the desired effects?
- How did you verify that all new functionality works as expected?
- How did you verify that all changed functionality works as expected?
- How did you verify that the change has not introduced any regressions?
Describe the actions you performed (e.g., commands you ran, text you typed, buttons you clicked) and describe the results you observed.
-->

### Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] I have read the [**CONTRIBUTING**](https://github.com/10up/cypress-wp-setup/blob/develop/CONTRIBUTING.md) document.
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my change.
- [ ] All new and existing tests passed.

<!-- _NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open._ -->

### Changelog Entry

<!--
Add sample CHANGELOG.md entry for this PR, noting whether this is something being Added / Changed / Deprecated / Removed / Fixed / or Security related.
Example:
> 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 and any linked issue so that they can be added to this projects CREDITS.md file. -->
Props @
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test Setup

on:
pull_request:
branches:
- develop
push:
branches:
- develop
- trunk

jobs:
test:
name: ${{ matrix.core.name }}
runs-on: ubuntu-latest

strategy:
matrix:
core:
- { name: "WP latest", version: "latest" }
- { name: "WP 5.7", version: "5.7" }
- { name: "WP trunk", version: "master" }

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

- name: Run test
run: ./tests/run-test.sh
env:
WORDPRESS_VERSION: ${{ matrix.core.version }}
GITHUB_WORKSPACE: ${{ github.workspace }}

- name: Make artifacts available
uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-artifact
retention-days: 2
path: |
${{ github.workspace }}/cypress-test/tests/cypress/screenshots/
${{ github.workspace }}/cypress-test/tests/cypress/videos/
${{ github.workspace }}/cypress-test/tests/cypress/logs/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.18.0
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Changelog

All notable changes to this project will be documented in this file, per [the Keep a Changelog standard](http://keepachangelog.com/), and this project will adhere to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [0.1.0] - 2023-09-13

Initial public release. 🎉

### Added

- `tsconfig.json` file for code completion support (props [@dinhtungdu](https://github.com/dinhtungdu) via [#2](https://github.com/10up/cypress-wp-setup/pull/2)).
- Add all standard workflow and informational files (props [@cadic](https://github.com/cadic), [@jeffpaul](https://github.com/jeffpaul) via [#1](https://github.com/10up/cypress-wp-setup/pull/1), [#6](https://github.com/10up/cypress-wp-setup/pull/6), [#7](https://github.com/10up/cypress-wp-setup/pull/7), [#10](https://github.com/10up/cypress-wp-setup/pull/10), [#12](https://github.com/10up/cypress-wp-setup/pull/12), [#13](https://github.com/10up/cypress-wp-setup/pull/13), [#16](https://github.com/10up/cypress-wp-setup/pull/16), [#18](https://github.com/10up/cypress-wp-setup/pull/18)).
- Ability to specify just the WordPress version to run tests on, not the full `WordPress/WordPress#` syntax (props [@cadic](https://github.com/cadic) via [#9](https://github.com/10up/cypress-wp-setup/pull/9)).
- Use the `@10up/cypress-wp-utils` library (props [@cadic](https://github.com/cadic), [@peterwilsoncc](https://github.com/peterwilsoncc), [@Sidsector9](https://github.com/Sidsector9) via [#11](https://github.com/10up/cypress-wp-setup/pull/11), [#15](https://github.com/10up/cypress-wp-setup/pull/15), [#31](https://github.com/10up/cypress-wp-setup/pull/31)).
- Preserve cookies to keep a user logged in during tests (props [@cadic](https://github.com/cadic) via [#14](https://github.com/10up/cypress-wp-setup/pull/14)).
- Set `chromeWebSecurity` to `false` in our Cypress config (props [@dkotter](https://github.com/dkotter), [@iamdharmesh](https://github.com/iamdharmesh) via [#34](https://github.com/10up/cypress-wp-setup/pull/34)).
- New command, `env:destroy` that is used to destroy an environment (props [@dkotter](https://github.com/dkotter), [@Sidsector9](https://github.com/Sidsector9) via [#35](https://github.com/10up/cypress-wp-setup/pull/35)).

### Changed

- Run `npm install` script as a child process (props [@cadic](https://github.com/cadic), [@iamdharmesh](https://github.com/iamdharmesh) via [#19](https://github.com/10up/cypress-wp-setup/pull/19)).
- Update minimum WordPress version from 4.9 to 5.7 (props [@iamdharmesh](https://github.com/iamdharmesh), [@cadic](https://github.com/cadic), [@Sidsector9](https://github.com/Sidsector9) via [#20](https://github.com/10up/cypress-wp-setup/pull/20), [#28](https://github.com/10up/cypress-wp-setup/pull/28)).
- Migrated from Cypress 9 to Cypress 13 (props [@iamdharmesh](https://github.com/iamdharmesh), [@cadic](https://github.com/cadic), [@ravinderk](https://github.com/ravinderk) via [#23](https://github.com/10up/cypress-wp-setup/pull/23), [#37](https://github.com/10up/cypress-wp-setup/pull/37)).

### Fixed

- Remove existing `.wp-env.override.json` file if running tests on the `latest` WordPress version (props [@cadic](https://github.com/cadic) via [#8](https://github.com/10up/cypress-wp-setup/pull/8)).
- Addressed a test failure due to invalid `config.baseUrl` (props [@iamdharmesh](https://github.com/iamdharmesh), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#30](https://github.com/10up/cypress-wp-setup/pull/30)).
- Addressed a few issues with the latest version of `wp-env` (props [@dkotter](https://github.com/dkotter), [@Sidsector9](https://github.com/Sidsector9) via [#35](https://github.com/10up/cypress-wp-setup/pull/35)).

### Security

- Upgrade `ansi-regex` from 2.1.1 to 6.0.1 (props [@cadic](https://github.com/cadic) via [#17](https://github.com/10up/cypress-wp-setup/pull/17)).
- Upgrade `fs-extra` from 10.1.0 to 11.1.0 (props [@cadic](https://github.com/cadic), [@iamdharmesh](https://github.com/iamdharmesh) via [#32](https://github.com/10up/cypress-wp-setup/pull/32)).

[Unreleased]: https://github.com/10up/cypress-wp-setup/compare/trunk...develop
[0.1.0]: https://github.com/10up/cypress-wp-setup/releases/tag/0.1.0
128 changes: 128 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
48 changes: 48 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Contributing and Maintaining

First, thank you for taking the time to contribute!

The following is a set of guidelines for contributors as well as information and instructions around our maintenance process. The two are closely tied together in terms of how we all work together and set expectations, so while you may not need to know everything in here to submit an issue or pull request, it's best to keep them in the same document.

## Ways to contribute

Contributing isn't just writing code - it's anything that improves the project. All contributions are managed right here on GitHub. Here are some ways you can help:

### Reporting bugs

If you're running into an issue, please take a look through [existing issues](https://github.com/10up/cypress-wp-setup/issues) and [open a new one](https://github.com/10up/cypress-wp-setup/issues/new) if needed. If you're able, include steps to reproduce, environment information, and screenshots/screencasts as relevant.

### Suggesting enhancements

New features and enhancements are also managed via [issues](https://github.com/10up/cypress-wp-setup/issues).

### Pull requests

Pull requests represent a proposed solution to a specified problem. They should always reference an issue that describes the problem and contains discussion about the problem itself. Discussion on pull requests should be limited to the pull request itself, i.e. code review.

For more on how 10up writes and manages code, check out our [10up Engineering Best Practices](https://10up.github.io/Engineering-Best-Practices/).

## Workflow

The `develop` branch is the development branch which means it contains the next version to be released. `trunk` contains the latest released version. Always work on the `develop` branch and open up PRs against `develop`.

## Release instructions

1. Branch: Starting from `develop`, cut a release branch named `release/X.Y.Z` for your changes.
1. Version bump: Bump the version number in `package.json` and `package-lock.json` if it does not already reflect the version being released.
1. Changelog: Add/update the changelog in `CHANGELOG.md`.
1. Props: update `CREDITS.md` file with any new contributors, confirm maintainers are accurate.
1. New files: Check to be sure any new files/paths that are unnecessary in the production version are included in `.gitattributes`.
1. Readme updates: Make any other readme changes as necessary.
1. Merge: Make a non-fast-forward merge from your release branch to `develop` (or merge the pull request), then do the same for `develop` into `trunk`, ensuring you pull the most recent changes into `develop` first (`git checkout develop && git pull origin develop && git checkout trunk && git pull origin trunk && git merge --no-ff develop`). `trunk` contains the stable development version.
1. Push: Push your trunk branch to GitHub (e.g. `git push origin trunk`).
1. [Compare](https://github.com/10up/cypress-wp-setup/compare/trunk...develop) `trunk` to `develop` to ensure no additional changes were missed.
1. Release: Create a [new release](https://github.com/10up/cypress-wp-setup/releases/new), naming the tag and the release with the new version number, and targeting the `trunk` branch. Paste the changelog from `CHANGELOG.md` into the body of the release and include a link to the closed issues on the [milestone](https://github.com/10up/cypress-wp-setup/milestone/#?closed=1).
1. Close milestone: Edit the [milestone](https://github.com/10up/cypress-wp-setup/milestone/#) with release date (in the `Due date (optional)` field) and link to GitHub release (in the `Description` field), then close the milestone.
1. Punt incomplete items: If any open issues or PRs which were milestoned for `X.Y.Z` do not make it into the release, update their milestone to `X.Y.Z+1`, `X.Y+1.0`, `X+1.0.0` or `Future Release`.

### What to do if things go wrong

If you run into issues during the release process and things have NOT fully deployed to npm / whatever external-to-GitHub location that we might be publishing to, then the best thing to do will be to delete any Tag (e.g., <https://github.com/10up/cypress-wp-setup/releases/tag/TAGNAME>) or Release that's been created, research what's wrong, and once things are resolved work on re-tagging and re-releasing on GitHub and publishing externally where needed.

If you run into issues during the release process and things HAVE deployed to npm / whatever external-to-GitHub location that we might be publishing to, then the best thing to do will be to research what's wrong and once things are resolved work on a patch release and tag on GitHub and publishing externally where needed. At the top of the changelog / release notes it's best to note that its a hotfix to resolve whatever issues were found after the previous release.
21 changes: 21 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Credits

The following acknowledges the Maintainers for this repository, those who have Contributed to this repository (via bug reports, code, design, ideas, project management, translation, testing, etc.), and any Libraries utilized.

## Maintainers

The following individuals are responsible for curating the list of issues, responding to pull requests, and ensuring regular releases happen.

[Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul).

## Contributors

Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc.

[Max Lyuchin (@cadic)](https://github.com/cadic), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Ravinder Kumar (@ravinderk)](https://github.com/ravinderk).

## Libraries

The following software libraries are utilized in this repository.

n/a
Loading

0 comments on commit f71cfdb

Please sign in to comment.