Skip to content

Commit

Permalink
Merge branch 'master' into rnmobile/media-text-image-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerardo Pacheco committed Jul 7, 2020
2 parents 24e1a9e + e2da15e commit 5fe1f46
Show file tree
Hide file tree
Showing 370 changed files with 5,803 additions and 5,701 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Cancel
on: pull_request
jobs:
cancel:
name: 'Cancel Previous Runs'
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Get all workflow ids and set to env variable
run: echo ::set-env name=WORKFLOW_IDS_TO_CANCEL::$(curl https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows -s | jq -r '.workflows | map(.id|tostring) | join(",")')

- uses: styfle/[email protected]
with:
workflow_id: ${{ env.WORKFLOW_IDS_TO_CANCEL }}
access_token: ${{ secrets.GITHUB_TOKEN }}
190 changes: 1 addition & 189 deletions .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: End-2-End Tests
name: End-to-End Tests

on:
pull_request:
Expand Down Expand Up @@ -173,191 +173,3 @@ jobs:
run: |
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 3' < ~/.jest-e2e-tests )
author-1:
name: Author - 1

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Npm install and build
run: |
npm ci
FORCE_REDUCED_MOTION=true npm run build
- name: Install WordPress
run: |
echo '{ "config": { "SCRIPT_DEBUG": false, "WP_PHP_BINARY": "php", "WP_TESTS_EMAIL": "[email protected]", "WP_TESTS_TITLE": "Test Blog" } }' > .wp-env.override.json
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
npm run wp-env start
- name: Add Author User
run: |
npm run wp-env run tests-cli "wp user create author [email protected] --role=author --user_pass=authpass"
npm run wp-env run tests-cli "wp post update 1 --post_author=2"
- name: Running the tests
run: |
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 0' < ~/.jest-e2e-tests )
author-2:
name: Author - 2

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Npm install and build
run: |
npm ci
FORCE_REDUCED_MOTION=true npm run build
- name: Install WordPress
run: |
echo '{ "config": { "SCRIPT_DEBUG": false, "WP_PHP_BINARY": "php", "WP_TESTS_EMAIL": "[email protected]", "WP_TESTS_TITLE": "Test Blog" } }' > .wp-env.override.json
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
npm run wp-env start
- name: Add Author User
run: |
npm run wp-env run tests-cli "wp user create author [email protected] --role=author --user_pass=authpass"
npm run wp-env run tests-cli "wp post update 1 --post_author=2"
- name: Running the tests
run: |
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 1' < ~/.jest-e2e-tests )
author-3:
name: Author - 3

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Npm install and build
run: |
npm ci
FORCE_REDUCED_MOTION=true npm run build
- name: Install WordPress
run: |
echo '{ "config": { "SCRIPT_DEBUG": false, "WP_PHP_BINARY": "php", "WP_TESTS_EMAIL": "[email protected]", "WP_TESTS_TITLE": "Test Blog" } }' > .wp-env.override.json
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
npm run wp-env start
- name: Add Author User
run: |
npm run wp-env run tests-cli "wp user create author [email protected] --role=author --user_pass=authpass"
npm run wp-env run tests-cli "wp post update 1 --post_author=2"
- name: Running the tests
run: |
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 2' < ~/.jest-e2e-tests )
author-4:
name: Author - 4

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Npm install and build
run: |
npm ci
FORCE_REDUCED_MOTION=true npm run build
- name: Install WordPress
run: |
echo '{ "config": { "SCRIPT_DEBUG": false, "WP_PHP_BINARY": "php", "WP_TESTS_EMAIL": "[email protected]", "WP_TESTS_TITLE": "Test Blog" } }' > .wp-env.override.json
chmod -R 767 ./ # TODO: Possibly integrate in wp-env
npm run wp-env start
- name: Add Author User
run: |
npm run wp-env run tests-cli "wp user create author [email protected] --role=author --user_pass=authpass"
npm run wp-env run tests-cli "wp post update 1 --post_author=2"
- name: Running the tests
run: |
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
$( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 3' < ~/.jest-e2e-tests )
3 changes: 3 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "packages/scripts/config/.markdownlint.json"
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
save-exact = true
engine-strict = true
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
== Changelog ==

= 8.5.0-rc.1 =

To be provided later.


= 8.4.0 =

### Features
Expand Down
129 changes: 129 additions & 0 deletions docs/architecture/folder-structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Folder Structure

The following snippet explains how the Gutenberg repository is structured omitting irrelevant or obvious items with further explanations:

├── LICENSE
├── README.md
├── SECURITY.md
├── CONTRIBUTING.md
├── CONTRIBUTORS.md
├── CODE_OF_CONDUCT.md
├── .editorconfig
├── .eslintignore
├── .eslintrc
├── .jshintignore
├── .eslintignore
├── .prettierrc.js
├── .stylelintrc.json
├── .markdownlintignore
├── .npmpackagejsonlintrc.json
├── phpcs.xml.dist
│ Dot files and config files used to configure the various linting tools
│ used in the repository (PHP, JS, styles...).
├── .browserslistrc
├── babel.config.js
├── jsconfig.json
├── tsconfig.json
├── tsconfig.base.json
├── webpack.config.js
│ Transpilation and bundling Config files.
├── .wp-env.json
│ Config file for the development and testing environment.
│ Includes WordPress and the Gutenberg plugin.
├── composer.lock
├── composer.json
│ Handling of PHP dependencies. Essentially used for development tools.
│ The production code don't use external PHP dependencies.
├── package-lock.json
├── package.json
│ Handling of JavaScript dependencies. Both for development tools and
│ production dependencies.
│ The package.json also serves to define common tasks and scripts
| used for day to day development.
├── changelog.txt
├── readme.txt
│ Readme and Changelog of the Gutenberg plugin hosted on the WordPress
│ plugin repository.
├── gutenberg.php
│ Entry point of the Gutenberg plugin.
├── post-content.php
│ Demo post content used on the Gutenberg plugin to showcase the editor.
├── .github/*
│ Config of the different Github features (issues and PR templates, CI, owners).
├── bin/api-docs
│ Tool/script used to generate the API Docs.
├── bin/packages
│ Set of scripts used to build the WordPress packages.
├── bin/plugin
│ Tool use to perform the Gutenberg plugin release and the npm releases as well.
├── docs/tool
│ Tool used to generate the Block editor handbook's markdown pages.
├── docs/*.md
│ Set of documentation pages composing the [Block editor handbook](https://developer.wordpress.org/block-editor/).
├── lib
│ PHP Source code of the Gutenberg plugin.
├── packages
│ Source code of the WordPress packages.
│ Packages can be:
│ - Production JavaScript scripts and styles loaded on WordPress
│ and the Gutenberg plugin or distributed as npm packages.
│ - Development tools available on npm.
├── packages/{packageName}/package.json
│ Dependencies of the current package.
├── packages/{packageName}/CHANGELOG.md
├── packages/{packageName}/README.md
├── packages/{packageName}/src/**/*.js
├── packages/{packageName}/src/**/*.scss
│ Source code of a given package.
|
├── packages/{packageName}/src/**/*.test.js
│ JavaScript unit tests.
|
├── packages/{packageName}/src/**/{ComponentName}/index.js
│ Entry point of a given component.
|
├── packages/{packageName}/src/**/{ComponentName}/style.scss
│ Style entry point for a given component.
├── packages/{packageName}/src/**/{ComponentName}/stories/*.js
│ Component Stories to load on the Gutenberg storybook.
├── packages/e2e-tests
│ End-2-end tests of the Gutenberg plugin.
│ Distributed as a package for potential reuse in Core and other plugins.
├── phpunit
│ Unit tests for the PHP code of the Gutenberg plugin.
├── storybook
│ Config of the [Gutenberg Storybook](http://wordpress.github.io).
├── test/integration
│ Set of WordPress packages integration tests.
├── test/native
│ Configuration for the Gutenberg Mobile unit tests.
└── test/unit
Configuration for the Packages unit tests.

1 change: 1 addition & 0 deletions docs/architecture/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

This living document serves as a high-level documentation to explain the conceptual choices and tool choices in the Gutenberg repository.

- [Understand the repository folder structure](/docs/architecture/folder-structure.md).
- [Modularity and WordPress Packages](/docs/architecture/modularity.md).
- [Block Editor Performance](/docs/architecture/performance.md).
- What are the decision decisions behind the Data Module?
Expand Down
Loading

0 comments on commit 5fe1f46

Please sign in to comment.