Skip to content

Commit

Permalink
Merge branch 'trunk' into refactor/gallery-to-nested-image-blocks-ups…
Browse files Browse the repository at this point in the history
…tream

Merging with conflict unresolved to make resolution reviewable in the
following commit.
  • Loading branch information
mkevins committed Jun 16, 2021
2 parents b2031f2 + 4026183 commit 71b249c
Show file tree
Hide file tree
Showing 742 changed files with 8,304 additions and 4,507 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ module.exports = {
jsdoc: {
mode: 'typescript',
},
'import/resolver': require.resolve( './test/lint/import-resolver' ),
},
rules: {
'jest/expect-expect': 'off',
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,26 +111,25 @@ jobs:
name: Build Release Artifact
runs-on: ubuntu-latest
needs: bump-version
if: always()
if: ${{ ( github.repository == 'WordPress/gutenberg' && always() ) || ( github.event_name == 'pull_request' && always() ) }}

steps:
- name: Checkout code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
with:
ref: ${{ needs.bump-version.outputs.release_branch || github.ref }}

- name: Use Node.js 14.x
- name: Use desired version of NodeJS
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
with:
node-version: 14.x
node-version: 14

- name: Cache node modules
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
env:
cache-name: cache-node-modules
- name: Cache NPM packages
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-14-npm-cache-${{ hashFiles('**/package-lock.json') }}

- name: Build Gutenberg plugin ZIP file
run: ./bin/build-plugin-zip.sh
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,27 @@ jobs:
build:
name: Check
runs-on: ubuntu-latest

strategy:
matrix:
node: ['14']
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
with:
fetch-depth: 1

- name: Use Node.js 14.x
- name: Use desired version of NodeJS
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
with:
node-version: 14.x
node-version: ${{ matrix.node }}

- name: Cache NPM packages
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }}

- uses: preactjs/compressed-size-action@7d87f60a6b0c7d193b8183ce859ed00b356ea92f # v2.1.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: '{build/**/*.js,build/**/*.css}'
pattern: '{build/**/*.min.js,build/**/*.css}'
12 changes: 5 additions & 7 deletions .github/workflows/create-block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,22 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [12, 14]
node: ['12', '14']

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4

- name: Use Node.js ${{ matrix.node }}.x
- name: Use desired version of NodeJS
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
with:
node-version: ${{ matrix.node }}

- name: Cache node modules
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
env:
cache-name: cache-node-modules-${{ matrix.node }}
- name: Cache NPM packages
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }}

- name: npm install, build, format and lint
run: |
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,22 @@ jobs:
fail-fast: false
matrix:
part: [1, 2, 3, 4]
node: ['14']

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4

- name: Use Node.js 14.x
- name: Use desired version of NodeJS
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
with:
node-version: 14.x
node-version: ${{ matrix.node }}

- name: Cache node modules
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
env:
cache-name: cache-node-modules
- name: Cache NPM packages
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }}

- name: Npm install and build
run: |
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,17 @@ jobs:
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4

- name: Use Node.js 14.x
- name: Use desired version of NodeJS
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
with:
node-version: 14.x
node-version: 14

- name: Cache node modules
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
env:
cache-name: cache-node-modules
- name: Cache NPM packages
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-14-npm-cache-${{ hashFiles('**/package-lock.json') }}

- name: Npm install
run: |
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/pull-request-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,34 @@ jobs:
pull-request-automation:
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' }}
strategy:
matrix:
node: ['14']

steps:
# Checkout defaults to using the branch which triggered the event, which
# isn't necessarily `trunk` (e.g. in the case of a merge).
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
with:
ref: trunk

- name: Use Node.js 14.x
- name: Use desired version of NodeJS
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
with:
node-version: 14.x
node-version: ${{ matrix.node }}

- name: Cache NPM packages
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-pr-automation-cache-${{ hashFiles('**/package-lock.json') }}

# Changing into the action's directory and running `npm install` is much
# faster than a full project-wide `npm ci`.
- run: cd packages/project-management-automation && npm install
- name: Install NPM dependencies
run: npm install
working-directory: packages/project-management-automation

- uses: ./packages/project-management-automation
with:
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,28 @@ jobs:
strategy:
matrix:
native-test-name: [gutenberg-editor-initial-html]
node: ['14']

steps:
- name: checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4

- name: Use Node.js 14.x
- name: Use desired version of NodeJS
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
with:
node-version: 14.x
node-version: ${{ matrix.node }}

- name: Restore npm cache
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
- name: Cache NPM packages
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }}

- run: npm ci

- name: Restore Gradle cache
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,38 @@ jobs:
matrix:
xcode: [12.2]
native-test-name: [gutenberg-editor-initial-html]
node: ['14']

steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4

- name: Use Node.js 14.x
- name: Use desired version of NodeJS
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
with:
node-version: 14.x
node-version: ${{ matrix.node }}

- name: Restore npm cache
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
- name: Cache NPM packages
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }}

- run: npm ci

- name: Prepare build cache key
run: find package-lock.json packages/react-native-editor/ios packages/react-native-aztec/ios packages/react-native-bridge/ios -type f -print0 | sort -z | xargs -0 shasum | tee ios-checksums.txt

- name: Restore build cache
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
path: |
packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app
packages/react-native-editor/ios/build/WDA
key: ${{ runner.os }}-ios-build-${{ matrix.xcode }}-${{ hashFiles('ios-checksums.txt') }}

- name: Restore pods cache
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
path: |
packages/react-native-editor/ios/Pods
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,32 @@ jobs:
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4

- name: Use Node.js 14.x
- name: Use desired version of NodeJS
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
with:
node-version: 14.x
node-version: 14

- name: Cache node modules
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
env:
cache-name: cache-node-modules
- name: Cache NPM packages
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-14-npm-cache-${{ hashFiles('**/package-lock.json') }}

- name: Npm install and build
- name: Npm install
# A "full" install is executed, since `npm ci` does not always exit
# with an error status code if the lock file is inaccurate.
#
# See: https://github.com/WordPress/gutenberg/issues/16157
run: |
npm install
npm run build
run: npm install

- name: Lint JavaScript and Styles
run: npm run lint

- name: Type checking
run: npm run build:package-types

- name: Build artifacts
- name: Check local changes
run: npm run check-local-changes

- name: License compatibility
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/storybook-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@ jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/gutenberg' }}
strategy:
matrix:
node: ['14']

steps:
- name: Checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
with:
ref: trunk

- name: Use Node.js 14.x
- name: Use desired version of NodeJS
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5
with:
node-version: 14.x
node-version: ${{ matrix.node }}

- name: Cache node modules
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4
env:
cache-name: cache-node-modules
- name: Cache NPM packages
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353 # v2.1.6
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ matrix.node }}-npm-cache-${{ hashFiles('**/package-lock.json') }}

- name: Install Dependencies
run: npm ci
Expand Down
Loading

0 comments on commit 71b249c

Please sign in to comment.