Skip to content

Commit

Permalink
Fix unintended commit
Browse files Browse the repository at this point in the history
This reverts commit 0fe6595.
  • Loading branch information
t-hamano authored Oct 13, 2023
1 parent 0fe6595 commit 4f42564
Show file tree
Hide file tree
Showing 440 changed files with 33,702 additions and 9,771 deletions.
26 changes: 26 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/.git
/.github
/.wordpress-org
/artifacts
/bin
/node_modules
/test
/vendor
.distignore
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.npmrc
.nvmrc
.prettierrc.js
.stylelintrc.js
.wp-env.json
composer.json
composer.lock
jest-puppeteer.config.js
package.json
package-lock.json
phpcs.ruleset.xml
README.md
webpack.config.js
31 changes: 30 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
module.exports = {
extends: [ 'plugin:@wordpress/eslint-plugin/recommended' ],
parser: '@babel/eslint-parser',
globals: {
jQuery: true,
},
rules: {
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off',
'@wordpress/no-unsafe-wp-apis': 'off',
'no-nested-ternary': 'off',
'no-unused-expressions': 'off',
'@wordpress/no-unsafe-wp-apis': 'off',
'jsdoc/require-param-type': 0,
'prettier/prettier': [
'error',
{
Expand All @@ -19,4 +24,28 @@ module.exports = {
},
],
},
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: [ '@babel/preset-react' ],
},
},
overrides: [
{
files: [ '**/test/**/*.js', '**/__tests__/**/*.js', '**/*.spec.js' ],
extends: [ 'plugin:@wordpress/eslint-plugin/test-unit' ],
settings: {
jest: {
version: 26,
},
},
},
{
files: [ 'test/e2e/**/*.js' ],
extends: [ 'plugin:@wordpress/eslint-plugin/test-e2e' ],
rules: {
'jest/expect-expect': 'off',
},
},
],
};
112 changes: 112 additions & 0 deletions .github/workflows/run-test-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Test and Deploy

on:
push:
branches-ignore:
- '**'
tags:
- '*'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: '7.4'
wp: WordPress
- php: '7.4'
wp: WordPress#6.2.2
- php: '7.4'
wp: WordPress#6.1.3
- php: '8.0'
wp: WordPress
- php: '8.0'
wp: WordPress#6.2.2
- php: '8.0'
wp: WordPress#6.1.3
- php: '8.2'
wp: WordPress
- php: '8.2'
wp: WordPress#6.2.2
name: PHP ${{ matrix.php }} / ${{ matrix.wp }} Test

steps:
- uses: actions/checkout@v3

- name: Use Node.js 14.x
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Npm install and build
run: |
npm ci
npm run build
- name: Composer install and set phpcs
run: |
composer install
composer phpcs
- name: Running lint check
run: npm run lint

- name: Install WordPress
run: |
WP_ENV_CORE=WordPress/${{ matrix.wp }} WP_ENV_PHP_VERSION=${{ matrix.php }} npm run wp-env start
npm run wp-env run cli wp core version
npm run wp-env run cli wp cli info
- name: Running e2e tests
run: npm run test:e2e

deploy:
name: Deploy to WP.org
runs-on: ubuntu-latest
needs: [ test ]
steps:
- name: Checkout
uses: actions/checkout@main

- name: Use Node.js 14.x
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Npm install and build
run: |
npm ci
npm run build
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: custom-html-block-extension

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
commitish: main

- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.deploy.outputs.zip-path }}
asset_name: ${{ github.event.repository.name }}.zip
asset_content_type: application/zip
73 changes: 73 additions & 0 deletions .github/workflows/run-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Test

on:
push:
tags-ignore:
- '**'
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php: '7.4'
wp: WordPress
- php: '7.4'
wp: WordPress#6.2.2
- php: '7.4'
wp: WordPress#6.1.3
- php: '8.0'
wp: WordPress
- php: '8.0'
wp: WordPress#6.2.2
- php: '8.0'
wp: WordPress#6.1.3
- php: '8.2'
wp: WordPress
- php: '8.2'
wp: WordPress#6.2.2
name: PHP ${{ matrix.php }} / ${{ matrix.wp }} Test

steps:
- uses: actions/checkout@v3

- name: Use Node.js 14.x
uses: actions/setup-node@v3
with:
node-version: '14'

- name: Npm install and build
run: |
npm ci
npm run build
- name: Composer install and set phpcs
run: |
composer install
composer phpcs
- name: Running lint check
run: npm run lint

- name: Install WordPress
run: |
WP_ENV_CORE=WordPress/${{ matrix.wp }} WP_ENV_PHP_VERSION=${{ matrix.php }} npm run wp-env start
npm run wp-env run cli wp core version
npm run wp-env run cli wp cli info
- name: Running e2e tests
run: npm run test:e2e

- name: Archive debug artifacts
uses: actions/upload-artifact@v3
if: always()
with:
name: failures-artifacts
path: artifacts
if-no-files-found: ignore
5 changes: 4 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ const config = {
printWidth: 100,
bracketSpacing: true,
parenSpacing: true,
parser: 'typescript',
// Set new property instead of jsxBracketSameLine
bracketSameLine: false,
}

// Remove deprecated property
delete config.jsxBracketSameLine

module.exports = config;
6 changes: 0 additions & 6 deletions .stylelintignore

This file was deleted.

21 changes: 17 additions & 4 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
module.exports = {
extends: [
'@wordpress/stylelint-config/scss'
'@wordpress/stylelint-config/scss',
'stylelint-config-recess-order',
],
ignoreFiles: [
'build/**/*.css',
'node_modules/**/*.css',
'vendor/**/*.css',
'**/*.js',
'**/*.svg'
],
rules: {
"no-descending-specificity": null,
"font-weight-notation": null,
"selector-class-pattern": null,
'no-descending-specificity': null,
'font-weight-notation': null,
'font-family-no-missing-generic-family-keyword': null,
'selector-class-pattern': null,
'at-rule-empty-line-before': null,
'declaration-property-unit-allowed-list': {
'line-height': []
},
}
}
Binary file added .wordpress-org/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"core": "WordPress/WordPress",
"plugins": [ "." ]
"plugins": [
".",
"https://downloads.wordpress.org/plugin/classic-editor.zip"
],
"env": {
"tests": {
"config": {
"WP_DEBUG": true,
"SCRIPT_DEBUG": true
}
}
}
}
Loading

0 comments on commit 4f42564

Please sign in to comment.