Skip to content

Commit

Permalink
[not verified] Merge branch 'master' into try/boost-javascript-tests-…
Browse files Browse the repository at this point in the history
…workflow

* master: (57 commits)
  E2E tests: run against atomic test site (#20807)
  Connection: remove in-place from main connection flow (#20797)
  Restore the 'safecss_embed_style' filter from the pre-4.7 Custom CSS (#20654)
  Photon: Add webp support (#20473)
  Responsive Videos: support more embed block formats (#20834)
  Instant Search: ensure box-shadow and text-shadow aren't applied to search buttons (#20833)
  Search: Apply design polish to the Customberg customization interface (#20754)
  Block editor: add .min suffix to all resources loaded in editor (#20820)
  Release forgotten projects (#20837)
  tools: Update help texts (#20830)
  Remove any wp-env leftovers (#20835)
  CLI: Remove autotagger prompt when generating a new plugin (#20826)
  Enable Support to perform utf8 conversions during checksum calculations (#20816)
  remove unused methods (#20828)
  Remove unnecessary use of `prettier` on JSON data (#20823)
  push-to-mirrors: fix auth for "mirror repo exists" check (#20824)
  cli: Fix tests (#20825)
  Issue templates: update docs & allow selecting no plugin (#20821)
  update annotations versions (#20794)
  Admin: use JetpackFooter RNA component (#20630)
  ...
  • Loading branch information
davidlonjon committed Aug 27, 2021
2 parents 6621dd5 + 323a331 commit 206e7e6
Show file tree
Hide file tree
Showing 369 changed files with 6,781 additions and 4,544 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ body:
- Beta
- Debug Helper
- VaultPress
- None
multiple: true
validations:
required: true
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ body:
- Beta
- Debug Helper
- VaultPress
- None
multiple: true
validations:
required: true
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ body:
- Beta
- Debug Helper
- VaultPress
- None
multiple: true
validations:
required: true
Expand Down
6 changes: 3 additions & 3 deletions .github/files/build-all-projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ for SLUG in "${SLUGS[@]}"; do
# That allows us to pick up the built version for plugins like Jetpack.
# Also save the old contents to restore post-build to help with local testing.
OLDJSON=$(<composer.json)
JSON=$(jq --argjson repo "$REPO" '( .repositories // [] | map( .options.monorepo or false ) | index(true) ) as $i | if $i != null then .repositories[$i:$i] |= [ $repo ] else . end' composer.json | "$BASE/tools/prettier" --parser=json-stringify)
JSON=$(jq --tab --argjson repo "$REPO" '( .repositories // [] | map( .options.monorepo or false ) | index(true) ) as $i | if $i != null then .repositories[$i:$i] |= [ $repo ] else . end' composer.json)
if [[ "$JSON" != "$OLDJSON" ]]; then
echo "$JSON" > composer.json
if [[ -e "composer.lock" ]]; then
Expand Down Expand Up @@ -185,14 +185,14 @@ for SLUG in "${SLUGS[@]}"; do
xargs cp --parents --target-directory="$BUILD_DIR"

# Remove monorepo repos from composer.json
JSON=$(jq 'if .repositories then .repositories |= map( select( .options.monorepo | not ) ) else . end' "$BUILD_DIR/composer.json" | "$BASE/tools/prettier" --parser=json-stringify)
JSON=$(jq --tab 'if .repositories then .repositories |= map( select( .options.monorepo | not ) ) else . end' "$BUILD_DIR/composer.json")
if [[ "$JSON" != "$(<"$BUILD_DIR/composer.json")" ]]; then
echo "$JSON" > "$BUILD_DIR/composer.json"
fi

# Remove engines from package.json
if [[ -e "$BUILD_DIR/package.json" ]]; then
JSON=$(jq 'if .publish_engines then .engines = .publish_engines | .publish_engines |= empty else .engines |= empty end' "$BUILD_DIR/package.json" | "$BASE/tools/prettier" --parser=json-stringify)
JSON=$(jq --tab 'if .publish_engines then .engines = .publish_engines | .publish_engines |= empty else .engines |= empty end' "$BUILD_DIR/package.json")
if [[ "$JSON" != "$(<"$BUILD_DIR/package.json")" ]]; then
echo "$JSON" > "$BUILD_DIR/package.json"
fi
Expand Down
23 changes: 21 additions & 2 deletions .github/files/required-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,22 @@
- name: Monorepo itself
paths:
- '!projects/**'
- '!pnpm-lock.yaml'
teams:
- jetpack-approvers

# Everyone who can approve anything can merge pnpm.lock.
- name: pnpm lockfile
paths:
- 'pnpm-lock.yaml'
teams:
# Unfortunately this list need to be maintaned manually...
- jetpack-approvers
- yamato-backup-and-security
- heart-of-gold
- jetpack-search
- '@davidlonjon'

# Jetpack Approvers review the Jetpack plugin and all packages.
- name: Jetpack and packages
paths:
Expand All @@ -19,7 +32,6 @@
paths:
- 'projects/plugins/vaultpress/**'
- 'projects/plugins/backup/**'
- 'pnpm-lock.yaml'
teams:
- yamato-backup-and-security
- jetpack-approvers
Expand All @@ -29,12 +41,19 @@
- name: Boost
paths:
- 'projects/plugins/boost/**'
- 'pnpm-lock.yaml'
teams:
- heart-of-gold
- jetpack-approvers
- '@davidlonjon'

# The Search team reviews changes to the Search plugin
- name: Search
paths:
- 'projects/plugins/search/**'
teams:
- jetpack-search
- jetpack-approvers

# Jetpack Approvers review everything that hasn't been specifically assigned above.
# This needs to be last.
- name: Default to Jetpack Approvers
Expand Down
168 changes: 168 additions & 0 deletions .github/workflows/e2e-tests-atomic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
name: E2E Tests on Atomic sites

on:
schedule:
- cron: '0 */4 * * *'

jobs:
e2e-tests:
name: "E2E tests"
runs-on: ubuntu-latest
timeout-minutes: 25

steps:
- uses: actions/checkout@v2

- name: Read tool versions
id: versions
uses: ./.github/actions/read-versions

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ steps.versions.outputs.node-version }}

- name: Use pnpm cache
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ steps.versions.outputs.node-version }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-pnpm-${{ steps.versions.outputs.node-version }}-
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: ${{ steps.versions.outputs.pnpm-version }}

- name: Tool versions
run: |
which node
node --version
which pnpm
pnpm --version
which jq
jq --version
- name: Install
working-directory: projects/plugins/jetpack/tests/e2e
env:
CONFIG_KEY: ${{ secrets.E2E_CONFIG_KEY }}
run: |
pnpm install --dir ../../../../tools/cli
pnpm install
pnpm run test-decrypt-config
- name: Run tests
working-directory: projects/plugins/jetpack/tests/e2e
env:
TEST_SITE: atomic
run: pnpm run test-e2e -- --group=atomic

- name: Upload test artifacts
if: ${{ always() }}
continue-on-error: true
uses: actions/upload-artifact@v2
with:
name: test-output-${{ matrix.group }}
path: projects/plugins/jetpack/tests/e2e/output

- name: Send Slack notification
if: ${{ failure() }}
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
working-directory: projects/plugins/jetpack/tests/e2e
run: NODE_ENV=test node ./bin/slack.js run atomic

- uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}
if: always()
- name: Publish to Testspace
working-directory: projects/plugins/jetpack/tests/e2e
run: |
testspace "[${GROUP}]output/reports/junit-*.xml"
if: always()

slack-notification:
name: "Slack notification"
runs-on: ubuntu-latest
needs: e2e-tests
env:
CONFIG_KEY: ${{ secrets.E2E_CONFIG_KEY }}
GITHUB_CONTEXT: ${{ toJson(github) }}

steps:
- uses: actions/checkout@v2

- name: Read tool versions
id: versions
uses: ./.github/actions/read-versions

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ steps.versions.outputs.node-version }}

- name: Use pnpm cache
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ steps.versions.outputs.node-version }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-pnpm-${{ steps.versions.outputs.node-version }}-
- name: Setup pnpm
uses: pnpm/[email protected]
with:
version: ${{ steps.versions.outputs.pnpm-version }}

- name: Tool versions
run: |
which node
node --version
which pnpm
pnpm --version
- name: Send Slack notification
working-directory: projects/plugins/jetpack/tests/e2e
env:
RESULT: ${{ needs.e2e-tests.result }}
run: |
pnpm install
pnpm run test-decrypt-config
NODE_ENV=test node ./bin/slack.js job $RESULT
test-reports:
name: "Trigger test report workflow"
runs-on: ubuntu-latest
if: ${{ ! cancelled() }}
needs: e2e-tests

steps:
- name: Trigger test report workflow
env:
TOKEN: ${{ secrets.E2E_TEST_REPORTS_TOKEN }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
if [ "$GITHUB_EVENT_NAME" == pull_request ]; then
BRANCH=$GITHUB_HEAD_REF
EVENT_NAME="$PR_NUMBER: $PR_TITLE"
else
BRANCH=${GITHUB_REF:11}
EVENT_NAME="Run $GITHUB_RUN_ID"
fi
curl -X POST https://api.github.com/repos/automattic/jetpack-e2e-reports/dispatches \
-H "Accept: application/vnd.github.v3+json" \
-u "user:$TOKEN" \
--data "{\"event_type\": \"$EVENT_NAME\",
\"client_payload\": {
\"repository\": \"$GITHUB_REPOSITORY\",
\"run_id\": \"$GITHUB_RUN_ID\",
\"run_number\": \"$GITHUB_RUN_NUMBER\",
\"branch\": \"$BRANCH\",
\"pr_title\": \"$PR_TITLE\",
\"pr_number\": \"$PR_NUMBER\"
}}"
78 changes: 0 additions & 78 deletions .github/workflows/storybook-pages.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
<element value="jetpack"/>
<!-- Jetpack Beta plugin -->
<element value="jetpack-beta"/>
<!-- Jetpack Standalone Plugins -->
<element value="jetpack-backup"/>
<element value="jetpack-boost"/>
<element value="jetpack-search"/>
</property>
</properties>
</rule>
Expand Down
3 changes: 1 addition & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/guides/report-bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Not mentioned in any of those places? Not caused by a conflict with another plug

### 3. Submit a detailed, precise bug report

The more specific your ticket is, the easier it will be for someone to zap the bug. Log in to GitHub, [open a new issue](https://github.com/Automattic/jetpack/issues/new), and be sure to fill out all the relevant details: a concise summary and a clear description are key. If it's been mentioned by someone else, like on the [Jetpack Support Forums](http://wordpress.org/support/plugin/jetpack), include a link.
The more specific your ticket is, the easier it will be for someone to zap the bug. Log in to GitHub, [open a new issue](https://github.com/Automattic/jetpack/issues/new?assignees=&labels=%5BType%5D+Bug&template=bug-report.yml), and be sure to fill out all the relevant details: a concise summary and a clear description are key. If it's been mentioned by someone else, like on the [Jetpack Support Forums](http://wordpress.org/support/plugin/jetpack), include a link.

Here's a sample of what a helpful summary looks like:

Expand Down
2 changes: 1 addition & 1 deletion docs/testing/beta-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ Once you've installed and activated the Beta plugin, head over to **Jetpack > Be

## Found a bug?

If you find an issue or have remarks about a Jetpack feature, you can [send us an email](https://jetpack.com/contact-support/beta-group/), or [create an issue on GitHub.](https://github.com/Automattic/Jetpack/issues/new)
If you find an issue or have remarks about a Jetpack feature, you can [send us an email](https://jetpack.com/contact-support/beta-group/), or [create an issue on GitHub.](https://github.com/Automattic/Jetpack/issues/new?assignees=&labels=%5BType%5D+Bug&template=bug-report.yml)

If you’re filing a bug, specific steps to reproduce are helpful. Please include the URL of the page that has the bug, along with what you expected to see and what happened instead. You can [check our recommendations to create great bug reports here](/docs/guides/report-bugs.md).
Loading

0 comments on commit 206e7e6

Please sign in to comment.