-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1236 from equalizedigital/stage
Stage
- Loading branch information
Showing
130 changed files
with
43,700 additions
and
18,881 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This file is for unifying the coding style for different editors and IDEs | ||
# editorconfig.org | ||
|
||
# WordPress Coding Standards | ||
# https://make.wordpress.org/core/handbook/coding-standards/ | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
indent_style = tab | ||
|
||
[*.{yml,yaml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.{gradle,java,kt}] | ||
indent_style = space | ||
|
||
[packages/react-native-*/**.xml] | ||
indent_style = space | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": ["plugin:@wordpress/eslint-plugin/recommended"], | ||
"ignorePatterns": ["*min.js", "dist/**", "update-theme.js"], | ||
"env": { | ||
"browser": true | ||
}, | ||
"globals": { | ||
"jQuery": "readonly" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<!-- | ||
For Work In Progress Pull Requests, please use the Draft PR feature, | ||
see https://github.blog/2019-02-14-introducing-draft-pull-requests/ for further details. | ||
For a timely review/response, please avoid force-pushing additional | ||
commits if your PR already received reviews or comments. | ||
Before submitting a Pull Request, please ensure you've done the following: | ||
- 📖 Reference the Equalize Digital Development Standards Wiki as needed: https://github.com/equalizedigital/development-standards/wiki | ||
- 📖 Reference the Equalize Digital Pull Request Guidelines: https://github.com/equalizedigital/development-standards/wiki/Version-Control#pull-request-guidelines | ||
- 👷♀️ Create small PRs. In most cases this will be possible. | ||
- 📝 Use descriptive commit messages. | ||
- 📗 Update any related documentation and include any relevant screenshots. | ||
--> | ||
|
||
## What type of PR is this? (check all applicable) | ||
|
||
- [ ] 🍕 Feature | ||
- [ ] 🐛 Bug Fix | ||
- [ ] 📝 Documentation Update | ||
- [ ] 🎨 Style | ||
- [ ] 🧑💻 Code Refactor | ||
- [ ] 🔥 Performance Improvements | ||
- [ ] ✅ Test | ||
- [ ] 🤖 Build | ||
- [ ] 🔁 CI | ||
- [ ] ⏩ Revert | ||
|
||
## Description | ||
<!-- Please provide a brief description of the changes you're proposing. --> | ||
|
||
## Related Tickets & Documents | ||
<!-- | ||
For pull requests that relate or close an issue, please include them | ||
below. Follow [Github's guidance on linking issues to pull requests](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue). | ||
For example having the text: "closes #1234" would connect the current pull | ||
request to issue 1234. And when we merge the pull request, Github will | ||
automatically close the issue. | ||
--> | ||
|
||
- Related Issue # | ||
- Closes # | ||
- Related Basecamp To-do URL: | ||
- Related Support Ticket URL: | ||
|
||
## Proof of Functionality | ||
<!-- Provide screenshots, GIFs, videos, or links to a deployed version of the site demonstrating the changes. --> | ||
|
||
## Accessibility checklist | ||
_If your PR includes UI changes, please utilize this checklist:_ | ||
- [ ] Semantic HTML implemented? | ||
- [ ] Keyboard operability supported? | ||
- [ ] Checked with [Accessibility Checker](https://wordpress.org/plugins/accessibility-checker/) or [WAVE](https://wave.webaim.org/) and addressed `Error` and `Warning` issues? | ||
|
||
_For more info, check out the | ||
[Accessibility Checker Documentation](https://equalizedigital.com/accessibility-checker/documentation/)._ | ||
|
||
## Quality assurance | ||
- [ ] I have tested this code to the best of my abilities. | ||
- [ ] I have run local linting and tests. | ||
- [ ] I have checked that the base branch is correctly set. | ||
- [ ] I have updated the documentation or README.md accordingly. | ||
|
||
## [optional] Are there any post deployment tasks we need to perform? | ||
<!-- List any tasks that need to be carried out once the PR is deployed. --> | ||
|
||
## Additional Notes | ||
<!-- Add any other information about the PR here. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: CS | ||
|
||
on: | ||
# Run on all pushes (except to main) and on all pull requests. | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
- develop | ||
|
||
# Allow manually triggering the workflow. | ||
workflow_dispatch: | ||
|
||
# Cancels all previous workflow runs for the same branch that have not yet completed. | ||
concurrency: | ||
# The concurrency group contains the workflow name and the branch name. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
checkcs: | ||
name: 'Check code style' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
coverage: none | ||
tools: cs2pr | ||
|
||
# Validate the composer.json file. | ||
# @link https://getcomposer.org/doc/03-cli.md#validate | ||
- name: Validate Composer installation | ||
run: composer validate --no-check-all | ||
|
||
# Install dependencies and handle caching in one go. | ||
# @link https://github.com/marketplace/actions/install-composer-dependencies | ||
- name: Install Composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
# Bust the cache at least once a month - output format: YYYY-MM-DD. | ||
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F") | ||
|
||
# Check the codestyle of the files. | ||
# The results of the CS check will be shown inline in the PR via the CS2PR tool. | ||
# @link https://github.com/staabm/annotate-pull-request-from-checkstyle/ | ||
- name: Check PHP code style | ||
id: phpcs | ||
run: composer check-cs -- --report-full --report-checkstyle=./phpcs-report.xml --ignore=vendor | ||
|
||
- name: Show PHPCS results in PR | ||
if: ${{ always() && steps.phpcs.outcome == 'failure' }} | ||
run: cs2pr ./phpcs-report.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Lint JS | ||
|
||
on: | ||
# Run on pushes to select branches and on all pull requests. | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
- develop | ||
|
||
# Allow manually triggering the workflow. | ||
workflow_dispatch: | ||
|
||
# Cancels all previous workflow runs for the same branch that have not yet completed. | ||
concurrency: | ||
# The concurrency group contains the workflow name and the branch name. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
name: "Lint: JS" | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# Cache the Node.js modules to speed up the workflow. | ||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
|
||
# The lint stage doesn't run the unit tests or use code style, so no need for PHPUnit, WPCS or phpcompatibility. | ||
- name: 'Install NPM packages' | ||
run: npm install | ||
|
||
# Only run ESLint on changed JavaScript files. | ||
- name: 'Get changed JavaScript files' | ||
id: jsfiles | ||
run: | | ||
echo "JS_FILES<<EOF" >> $GITHUB_ENV | ||
git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '\.js$' || echo "" | ||
echo "EOF" >> $GITHUB_ENV | ||
|
||
- name: 'Run ESLint' | ||
if: env.JS_FILES != '' | ||
run: npm run lint:js -- ${{ env.JS_FILES }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Lint PHP | ||
|
||
on: | ||
# Run on pushes to select branches and on all pull requests. | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
- develop | ||
|
||
# Allow manually triggering the workflow. | ||
workflow_dispatch: | ||
|
||
# Cancels all previous workflow runs for the same branch that have not yet completed. | ||
concurrency: | ||
# The concurrency group contains the workflow name and the branch name. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
# Lint against the highest/lowest supported versions of each PHP major. | ||
# And also do a run against "nightly" (the current dev version of PHP). | ||
php_version: ['7.4', '8.0', '8.1', '8.2'] | ||
|
||
name: "Lint: PHP ${{ matrix.php_version }}" | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PHP for the composer install | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
coverage: none | ||
|
||
# The lint stage doesn't run the unit tests or use code style, so no need for PHPUnit, WPCS or phpcompatibility. | ||
- name: 'Composer: adjust dependencies - remove PHPUnit' | ||
run: composer remove --no-update --dev phpunit/phpunit --no-scripts --no-interaction | ||
- name: 'Composer: adjust dependencies - remove Yoast test urils' | ||
run: composer remove --no-update --dev yoast/wp-test-utils --no-scripts --no-interaction | ||
- name: 'Composer: adjust dependencies - remove PHPCompatibility' | ||
run: composer remove --no-update --dev phpcompatibility/phpcompatibility-wp --no-scripts --no-interaction | ||
- name: 'Composer: adjust dependencies - remove WPCS' | ||
run: composer remove --no-update --dev wp-coding-standards/wpcs --no-scripts --no-interaction | ||
|
||
# Install dependencies and handle caching in one go. | ||
# @link https://github.com/marketplace/actions/install-composer-dependencies | ||
- name: Install Composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
with: | ||
# Bust the cache at least once a month - output format: YYYY-MM-DD. | ||
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F") | ||
|
||
- name: Install PHP for the actual test | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php_version }} | ||
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On | ||
coverage: none | ||
tools: cs2pr | ||
|
||
- name: Lint against parse errors | ||
run: composer lint -- --checkstyle | cs2pr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Security | ||
|
||
on: | ||
# Run on all pushes and on all pull requests. | ||
push: | ||
branches: | ||
- master | ||
- main | ||
pull_request: | ||
branches: | ||
- master | ||
- main | ||
- develop | ||
|
||
# Allow manually triggering the workflow. | ||
workflow_dispatch: | ||
|
||
# Cancels all previous workflow runs for the same branch that have not yet completed. | ||
concurrency: | ||
# The concurrency group contains the workflow name and the branch name. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
security: | ||
name: 'Security check' | ||
runs-on: ubuntu-latest | ||
|
||
# Don't run the cronjob in this workflow on forks. | ||
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository_owner == 'Yoast') | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# This action checks the `composer.lock` file against known security vulnerabilities in the dependencies. | ||
# https://github.com/marketplace/actions/the-php-security-checker | ||
- name: Run Security Check | ||
uses: symfonycorp/security-checker-action@v5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.