-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
929 additions
and
938 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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
blank_issues_enabled: true | ||
contact_links: | ||
- name: General help request | ||
url: https://wordpress.org/support/forum/how-to-and-troubleshooting/ | ||
about: For general help requests, create a new topic in the Fixing WordPress support forum | ||
- name: Technical help request | ||
url: https://wordpress.org/support/forum/wp-advanced/ | ||
about: For more technical help requests, create a new topic in the Developing with WordPress Forum | ||
- name: Development help request | ||
url: https://wordpress.stackexchange.com/ | ||
about: For questions about WordPress development, ask a question in the WordPress Development Stack Exchange | ||
- name: General help request | ||
url: https://wordpress.org/support/forum/how-to-and-troubleshooting/ | ||
about: For general help requests, create a new topic in the Fixing WordPress support forum | ||
- name: Technical help request | ||
url: https://wordpress.org/support/forum/wp-advanced/ | ||
about: For more technical help requests, create a new topic in the Developing with WordPress Forum | ||
- name: Development help request | ||
url: https://wordpress.stackexchange.com/ | ||
about: For questions about WordPress development, ask a question in the WordPress Development Stack Exchange |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,15 +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 "WORKFLOW_IDS_TO_CANCEL=$(curl https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows -s | jq -r '.workflows | map(.id|tostring) | join(",")')" >> $GITHUB_ENV | ||
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 "WORKFLOW_IDS_TO_CANCEL=$(curl https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows -s | jq -r '.workflows | map(.id|tostring) | join(",")')" >> $GITHUB_ENV | ||
|
||
- uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.0 | ||
with: | ||
workflow_id: ${{ env.WORKFLOW_IDS_TO_CANCEL }} | ||
access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: styfle/cancel-workflow-action@3d86a7cc43670094ac248017207be0295edbc31d # v0.8.0 | ||
with: | ||
workflow_id: ${{ env.WORKFLOW_IDS_TO_CANCEL }} | ||
access_token: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -1,41 +1,41 @@ | ||
name: Create Block | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [trunk, wp/trunk] | ||
pull_request: | ||
push: | ||
branches: [trunk, wp/trunk] | ||
|
||
jobs: | ||
checks: | ||
name: Checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: [12, 14] | ||
checks: | ||
name: Checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: [12, 14] | ||
|
||
steps: | ||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 | ||
steps: | ||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 | ||
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: Cache node modules | ||
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 | ||
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 ${{ matrix.node }}.x | ||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: Use Node.js ${{ matrix.node }}.x | ||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: npm install, build, format and lint | ||
run: | | ||
npm ci | ||
npm run test:create-block | ||
- name: npm install, build, format and lint | ||
run: | | ||
npm ci | ||
npm run test:create-block |
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 |
---|---|---|
@@ -1,63 +1,62 @@ | ||
name: End-to-End Tests | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- trunk | ||
- 'wp/**' | ||
pull_request: | ||
push: | ||
branches: | ||
- trunk | ||
- 'wp/**' | ||
|
||
jobs: | ||
admin: | ||
name: Admin - ${{ matrix.part }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
part: [1, 2, 3, 4] | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 | ||
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 14.x | ||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Npm install and build | ||
run: | | ||
npm ci | ||
FORCE_REDUCED_MOTION=true npm run build | ||
- name: Install WordPress | ||
run: | | ||
chmod -R 767 ./ # TODO: Possibly integrate in wp-env | ||
npm run wp-env start | ||
- 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 == ${{ matrix.part }} - 1' < ~/.jest-e2e-tests ) | ||
- name: Archive debug artifacts (screenshots, HTML snapshots) | ||
uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571 # v2.2.2 | ||
if: always() | ||
with: | ||
name: failures-artifacts | ||
path: artifacts | ||
admin: | ||
name: Admin - ${{ matrix.part }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
part: [1, 2, 3, 4] | ||
|
||
steps: | ||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 | ||
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 14.x | ||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Npm install and build | ||
run: | | ||
npm ci | ||
FORCE_REDUCED_MOTION=true npm run build | ||
- name: Install WordPress | ||
run: | | ||
chmod -R 767 ./ # TODO: Possibly integrate in wp-env | ||
npm run wp-env start | ||
- 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 == ${{ matrix.part }} - 1' < ~/.jest-e2e-tests ) | ||
- name: Archive debug artifacts (screenshots, HTML snapshots) | ||
uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571 # v2.2.2 | ||
if: always() | ||
with: | ||
name: failures-artifacts | ||
path: artifacts |
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 |
---|---|---|
@@ -1,58 +1,56 @@ | ||
name: Performances Tests | ||
|
||
on: | ||
pull_request: | ||
release: | ||
types: [created] | ||
pull_request: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
performance: | ||
name: Run performance tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 | ||
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 14.x | ||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Npm install | ||
run: | | ||
npm ci | ||
- name: Compare performance with trunk | ||
if: github.event_name == 'pull_request' | ||
run: ./bin/plugin/cli.js perf --ci $GITHUB_SHA trunk --tests-branch $GITHUB_SHA | ||
|
||
- name: Compare performance with current WordPress Core and previous Gutenberg versions | ||
if: github.event_name == 'release' | ||
env: | ||
PLUGIN_VERSION: ${{ github.event.release.name }} | ||
run: | | ||
IFS='.' read -r -a PLUGIN_VERSION_ARRAY <<< "$PLUGIN_VERSION" | ||
CURRENT_RELEASE_BRANCH="release/${PLUGIN_VERSION_ARRAY[0]}.${PLUGIN_VERSION_ARRAY[1]}" | ||
PREVIOUS_VERSION_BASE_10=$(expr ${PLUGIN_VERSION_ARRAY[0]} \* 10 + ${PLUGIN_VERSION_ARRAY[1]} - 1) | ||
PREVIOUS_RELEASE_BRANCH="release/$(expr $PREVIOUS_VERSION_BASE_10 / 10).$(expr $PREVIOUS_VERSION_BASE_10 % 10)" | ||
TESTED_UP_TO_REGEX="Tested up to: \K([0-9]+)\.([0-9]+)\.?([0-9]?)" | ||
WP_VERSION=$(grep -oP "$TESTED_UP_TO_REGEX" ./readme.txt) | ||
IFS='.' read -r -a WP_VERSION_ARRAY <<< "$WP_VERSION" | ||
WP_BRANCH="wp/${WP_VERSION_ARRAY[0]}.${WP_VERSION_ARRAY[1]}" | ||
./bin/plugin/cli.js perf --ci $WP_BRANCH $PREVIOUS_RELEASE_BRANCH $CURRENT_RELEASE_BRANCH | ||
performance: | ||
name: Run performance tests | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4 | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 | ||
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 14.x | ||
uses: actions/setup-node@46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea # v2.1.5 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Npm install | ||
run: | | ||
npm ci | ||
- name: Compare performance with trunk | ||
if: github.event_name == 'pull_request' | ||
run: ./bin/plugin/cli.js perf --ci $GITHUB_SHA trunk --tests-branch $GITHUB_SHA | ||
|
||
- name: Compare performance with current WordPress Core and previous Gutenberg versions | ||
if: github.event_name == 'release' | ||
env: | ||
PLUGIN_VERSION: ${{ github.event.release.name }} | ||
run: | | ||
IFS='.' read -r -a PLUGIN_VERSION_ARRAY <<< "$PLUGIN_VERSION" | ||
CURRENT_RELEASE_BRANCH="release/${PLUGIN_VERSION_ARRAY[0]}.${PLUGIN_VERSION_ARRAY[1]}" | ||
PREVIOUS_VERSION_BASE_10=$(expr ${PLUGIN_VERSION_ARRAY[0]} \* 10 + ${PLUGIN_VERSION_ARRAY[1]} - 1) | ||
PREVIOUS_RELEASE_BRANCH="release/$(expr $PREVIOUS_VERSION_BASE_10 / 10).$(expr $PREVIOUS_VERSION_BASE_10 % 10)" | ||
TESTED_UP_TO_REGEX="Tested up to: \K([0-9]+)\.([0-9]+)\.?([0-9]?)" | ||
WP_VERSION=$(grep -oP "$TESTED_UP_TO_REGEX" ./readme.txt) | ||
IFS='.' read -r -a WP_VERSION_ARRAY <<< "$WP_VERSION" | ||
WP_BRANCH="wp/${WP_VERSION_ARRAY[0]}.${WP_VERSION_ARRAY[1]}" | ||
./bin/plugin/cli.js perf --ci $WP_BRANCH $PREVIOUS_RELEASE_BRANCH $CURRENT_RELEASE_BRANCH |
Oops, something went wrong.