- { this.props.translate( - 'Welcome to Calypso. Authorize the application with your WordPress.com credentials to get started.' - ) } -
-diff --git a/.circleci/config.yml b/.circleci/config.yml
index fccb6a5169b37..a2585678146e0 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -8,7 +8,7 @@ references:
defaults: &defaults
working_directory: ~/wp-calypso
docker:
- - image: cimg/node:12.20.1
+ - image: cimg/node:14.16.1
environment:
CIRCLE_ARTIFACTS: /tmp/artifacts
CIRCLE_TEST_REPORTS: /tmp/test_results
@@ -38,52 +38,6 @@ references:
"$CIRCLE_TEST_REPORTS/e2ereports" \
"$HOME/jest-cache"
- # Jest cache caching
- #
- # Jest uses a cache to speed up builds. If we persist this cache across builds,
- # we can improve the speed of subsequent builds.
- #
- # Circle caches never overwritten, so we must ensure that Jest caches from different jobs
- # do not collide or we'll only cache 1 job.
- #
- # We also need to ensure that different nodes and different total nodes do not collide.
- # When we split tests, different nodes will receive a different set of tests so each node's
- # cache should be unique.
- #
- # Finally, we cache on the branch and revision, falling back to origin/HEAD. This should give us
- # pretty good "nearest neighbor" primer for the Jest cache.
- #
- # More about the CircleCI cache: https://circleci.com/docs/2.0/caching
- restore-jest-cache: &restore-jest-cache
- name: Restore Jest cache
- keys:
- - v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v8-jest-{{ .Environment.CIRCLE_JOB }}-{{ .Environment.CIRCLE_NODE_INDEX }}/{{ .Environment.CIRCLE_NODE_TOTAL }}-{{ .Branch }}-{{ .Revision }}
- - v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v8-jest-{{ .Environment.CIRCLE_JOB }}-{{ .Environment.CIRCLE_NODE_INDEX }}/{{ .Environment.CIRCLE_NODE_TOTAL }}-{{ .Branch }}
- - v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v8-jest-{{ .Environment.CIRCLE_JOB }}-{{ .Environment.CIRCLE_NODE_INDEX }}/{{ .Environment.CIRCLE_NODE_TOTAL }}-trunk
- - v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v8-jest-{{ .Environment.CIRCLE_JOB }}-{{ .Environment.CIRCLE_NODE_INDEX }}/{{ .Environment.CIRCLE_NODE_TOTAL }}
- save-jest-cache: &save-jest-cache
- name: Save Jest cache
- key: v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v8-jest-{{ .Environment.CIRCLE_JOB }}-{{ .Environment.CIRCLE_NODE_INDEX }}/{{ .Environment.CIRCLE_NODE_TOTAL }}-{{ .Branch }}-{{ .Revision }}
- paths:
- - ~/jest-cache
-
- #
- # Build cache
- #
- # This contains caches used by the build process (mainly webpack loaders and plugins)
- restore-build-cache: &restore-build-cache
- name: Restore build cache
- keys:
- - v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v0-build-{{ .Branch }}-{{ .Revision }}
- - v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v0-build-{{ .Branch }}
- - v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v0-build-trunk
- - v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v0-build
- save-build-cache: &save-build-cache
- name: Save build cache
- key: v{{ .Environment.GLOBAL_CACHE_PREFIX }}-v0-build-{{ .Branch }}-{{ .Revision }}
- paths:
- - .cache
-
# Git cache
#
# Calypso is a big repository with a lot of history. It can take a long time to do a full checkout.
@@ -183,10 +137,7 @@ references:
npm install -g yarn
yarn run build-desktop:install-app-deps
desktop-cache-paths: &desktop-cache-paths
- - desktop/build
- - desktop/client
- desktop/config
- - desktop/public
- desktop/resource/certificates/win.p12
- desktop/resource/certificates/mac.p12
desktop-decrypt-assets: &desktop-decrypt-assets
@@ -337,256 +288,6 @@ jobs:
}
}'
- typecheck-strict:
- <<: *defaults
- parallelism: 1
- steps:
- - prepare
- - run:
- name: TypeScript strict typecheck of individual subprojects
- command: yarn run tsc --project client/landing/gutenboarding
-
- lint:
- <<: *defaults
- parallelism: 1
- steps:
- - prepare
- - run:
- name: Lint Config Keys
- when: always
- command: yarn run lint:config-defaults
- - run:
- name: Lint yarn.lock
- when: always
- command: |
- yarn
- DIRTY_FILES=$(git status --porcelain 2>/dev/null)
- if [[ ! -z "$DIRTY_FILES" ]]; then
- echo "Repository contains uncommitted changes: "
- echo "$DIRTY_FILES"
- echo "You need to checkout the branch, run 'yarn' and commit those files."
- exit 1
- fi
- - run:
- name: Lint Client and Server
- when: always
- command: |
- # We may not have files to lint which returns non-0 exit
- # Ensure this does not cause job failure (see `|| exit 0`)
- FILES_TO_LINT=$(
- git diff --name-only --diff-filter=d origin... \
- | grep -E '^(client/|server/|packages/)' \
- | grep -E '\.[jt]sx?$'
- ) || exit 0
-
- if [[ ! -z $FILES_TO_LINT ]]; then
- ./node_modules/.bin/eslint \
- --format junit \
- --output-file "$CIRCLE_TEST_REPORTS/eslint/results.xml" \
- $FILES_TO_LINT
- fi
- - store_test_results:
- path: /tmp/test_results
-
- build-notifications:
- <<: *defaults
- parallelism: 1
- steps:
- - prepare
- - run:
- name: Build Notifications Panel
- command: |
- cd apps/notifications/ && NODE_ENV=production yarn run build --output-path=$CIRCLE_ARTIFACTS/notifications-panel
- - store-artifacts-and-test-results
-
- build-o2-blocks:
- <<: *defaults
- parallelism: 1
- steps:
- - prepare
- - run:
- name: Build Gutenberg Blocks for internal p2s
- command: |
- cd apps/o2-blocks/ && NODE_ENV=production yarn run build --output-path=$CIRCLE_ARTIFACTS/o2-blocks
- - store-artifacts-and-test-results
-
- build-wpcom-block-editor:
- <<: *defaults
- parallelism: 1
- steps:
- - prepare
- - run:
- name: Build the block editor in WordPress.com integration utils package
- command: |
- cd apps/wpcom-block-editor/ && yarn build --output-path=$CIRCLE_ARTIFACTS/wpcom-block-editor
- - store-artifacts-and-test-results
-
- test-client:
- <<: *defaults
- parallelism: 6
- steps:
- - prepare
- - restore_cache: *restore-jest-cache
- - run:
- name: Run Client Tests
- no_output_timeout: 2m
- command: |
- # Use Jest to list tests to run via config
- ./node_modules/.bin/jest \
- --listTests \
- --config=test/client/jest.config.js \
- > ~/jest-tests
-
- # Run jest on the CircleCI split for parallelization across containers
- # Avoid using `--split-by=timings` here so that per-node Jest caches
- # receive a stable sub-set of tests for optimal cache usage.
- JEST_JUNIT_OUTPUT_DIR="$CIRCLE_TEST_REPORTS/client" \
- JEST_JUNIT_OUTPUT_NAME="results.xml" \
- ./node_modules/.bin/jest \
- --cacheDirectory="$HOME/jest-cache" \
- --ci \
- --maxWorkers=2 \
- --reporters=default \
- --reporters=jest-junit \
- --runTestsByPath \
- --silent \
- --config=test/client/jest.config.js \
- $( circleci tests split < ~/jest-tests )
- - save_cache: *save-jest-cache
- - store-artifacts-and-test-results
-
- test-integration:
- <<: *defaults
- parallelism: 1
- steps:
- - prepare
- - restore_cache: *restore-jest-cache
- - run:
- name: Run Integration Tests
- command: |
- JEST_JUNIT_OUTPUT_DIR="$CIRCLE_TEST_REPORTS/integration" \
- JEST_JUNIT_OUTPUT_NAME="results.xml" \
- ./node_modules/.bin/jest \
- --cacheDirectory="$HOME/jest-cache" \
- --ci \
- --maxWorkers=2 \
- --reporters=default \
- --reporters=jest-junit \
- --silent \
- --config=test/integration/jest.config.js
- - save_cache: *save-jest-cache
- - store-artifacts-and-test-results
-
- test-packages:
- <<: *defaults
- parallelism: 1
- steps:
- - prepare
- - restore_cache: *restore-jest-cache
- - run:
- name: Run Package Tests
- no_output_timeout: 2m
- command: |
- JEST_JUNIT_OUTPUT_DIR="$CIRCLE_TEST_REPORTS/packages" \
- JEST_JUNIT_OUTPUT_NAME="results.xml" \
- ./node_modules/.bin/jest \
- --cacheDirectory="$HOME/jest-cache" \
- --ci \
- --maxWorkers=2 \
- --reporters=default \
- --reporters=jest-junit \
- --silent \
- --config=test/packages/jest.config.js
- - save_cache: *save-jest-cache
- - store-artifacts-and-test-results
-
- test-server:
- <<: *defaults
- parallelism: 1
- steps:
- - prepare
- - restore_cache: *restore-jest-cache
- - run:
- name: Run Server Tests
- no_output_timeout: 2m
- command: |
- JEST_JUNIT_OUTPUT_DIR="$CIRCLE_TEST_REPORTS/server" \
- JEST_JUNIT_OUTPUT_NAME="results.xml" \
- ./node_modules/.bin/jest \
- --cacheDirectory="$HOME/jest-cache" \
- --ci \
- --maxWorkers=2 \
- --reporters=default \
- --reporters=jest-junit \
- --silent \
- --config=test/server/jest.config.js
- - save_cache: *save-jest-cache
- - store-artifacts-and-test-results
-
- # Prime calypso.live so it has a build ready
- #
- # We can send a request to calypso.live so that it gets a build ready.
- # This saves time waiting later when waiting for the calypso.live
- #
- # Expected usage:
- # - After setup
- # - Only on branches (not the primary branch)
- #
- prime-calypso-live:
- docker:
- - image: buildpack-deps
- working_directory: ~/wp-calypso
- steps:
- - run:
- name: Prime calypso.live
- command: |
- if [[ -z $CIRCLE_PR_USERNAME ]]; then
- curl --silent "https://hash-$CIRCLE_SHA1.calypso.live"
- fi
-
- # Wait for calypso.live to be ready
- #
- # Expected usage:
- # - After main tests have passed (test-client, test-server)
- # - Before e2e tests run
- #
- wait-calypso-live:
- docker:
- - image: buildpack-deps
- working_directory: ~/wp-calypso
- steps:
- - run:
- name: Check external author
- command: |
- if [[ ! -z $CIRCLE_PR_USERNAME ]]; then
- echo 'PRs from external authors cannot run on calypso.live'
- exit 1
- fi
- - restore_cache: *restore-git-cache
- - checkout
- # Don't bother updating the git cache here, it would be the second time in the workflow
- - run:
- name: Wait for calypso.live build
- command: ./test/e2e/scripts/wait-for-running-branch.sh
-
- test-e2e:
- <<: *defaults
- working_directory: ~/wp-calypso/test/e2e
- parallelism: 2
- steps:
- - prepare
- - run: *set-e2e-variables
- - run: *install-specific-chrome-browser
- - run: *save-chrome-version
- - run: sudo apt-get install -y xvfb
- - run: yarn run decryptconfig
- - run: ./scripts/randomize.sh specs
- - run: ./scripts/run-wrapper.sh
- - run: *move-e2e-artifacts
- - store-artifacts-and-test-results
- - slack/status:
- webhook: $SLACK_E2E
-
test-e2e-canary:
<<: *defaults
working_directory: ~/wp-calypso/test/e2e
@@ -658,23 +359,19 @@ jobs:
- slack/status:
webhook: << parameters.slack-webhook >>
- wp-desktop-source:
- # Use Linux machine executor, NOT docker image for higher available RAM (7.5GB)
- machine:
- image: ubuntu-1604:202004-01
- resource_class: medium
+ wp-desktop-assets:
+ docker:
+ - image: circleci/node:12.16.2-browsers
<<: *desktop_defaults
environment:
- NVM_DIR: '/opt/circleci/.nvm'
VERSION: << pipeline.git.tag >>
- CHROMEDRIVER_SKIP_DOWNLOAD: 'true'
- DETECT_CHROMEDRIVER_VERSION: 'false'
- PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
- NODE_OPTIONS: --max-old-space-size=6144
- YARN_CACHE_FOLDER: ~/.cache/yarn
CONFIG_ENV: release
+ working_directory: ~/wp-calypso
steps:
- checkout
+ - attach_workspace:
+ at: ~/wp-calypso
+ - run: *update-node
- when:
condition: << pipeline.git.tag >>
steps:
@@ -682,66 +379,8 @@ jobs:
name: Ensure package.json Version And Tag Match
command: cd desktop/bin && node validate_tag.js $VERSION
- run: *desktop-decrypt-assets
- - run:
- name: Compute cache checksums
- command: |
- # Get latest commit that modified packages directory
- echo "$(git log -n 1 --format='%h' -- packages .nvmrc yarn.lock)" > packages-hash
- - restore_cache: *desktop-restore-yarn-cache
- - restore_cache: *desktop-restore-packages-cache
- - restore_cache: *desktop-restore-calypso-build-cache
- - run:
- name: Install Linux deps
- command: |
- sudo apt update
- sudo apt-get install -y git-restore-mtime bc
- - run:
- name: Restore file modified time
- command: |
- # Webpack cache-loader depends on file mtime, which is reset by "git clone".
- # Use git-restore-mtime to restore original modification time of files based
- # on date of most recent commit that modified them.
- # Ref: http://manpages.ubuntu.com/manpages/bionic/man1/git-restore-mtime.1.html
- #
- # Note: this utility is highly optimized and is able to process all Calypso
- # files in less than 10 seconds!
- /usr/lib/git-core/git-restore-mtime --force --commit-time --skip-missing
- - run:
- name: Install Dependencies
- command: |
- # Install Node
- # Note: this syntax is required to load NVM_DIR in the machine executor.
- # Ref: https://discuss.circleci.com/t/circleci-forgetting-node-version-on-machine-executor/28813
- set +e
- set +x
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
- nvm install
- nvm use
- npm install -g yarn
-
- # defer to restored packages whenever possible
- # On a Machine executor, using cached built packages is significant:
- # https://github.com/Automattic/wp-calypso/pull/44696#discussion_r468010942
- if [ -f packages-cache-restored ]; then
- export DISABLEPOSTINSTALL=1
- fi
- yarn install --frozen-lockfile
- echo "$(cat packages-hash)" > packages-cache-restored
- - save_cache: *desktop-save-yarn-cache
- - run:
- name: Build Desktop and Calypso source
- no_output_timeout: 15m
- command: |
- set +e
- set +x
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
- nvm use
-
- yarn run build-desktop:source
- - save_cache: *desktop-save-packages-cache
- - save_cache: *desktop-save-calypso-build-cache
- persist_to_workspace:
- root: /home/circleci/wp-calypso
+ root: ~/wp-calypso
paths: *desktop-cache-paths
- run: *desktop-notify-github-failure
- slack/status: *desktop-notify-slack-failure
@@ -791,7 +430,7 @@ jobs:
name: Persist Mac Executable
command: |
# If this isn't a full artifact build, ensure to persist the built application for inspection
- if ls desktop/release/*.zip &>/dev/null
+ if ! ls desktop/release/*.zip &>/dev/null
then
ditto -ck --rsrc --sequesterRsrc desktop/release/mac desktop/release/mac.app.zip
fi
@@ -820,7 +459,7 @@ jobs:
wp-desktop-linux:
docker:
- - image: circleci/node:12.20.1-browsers
+ - image: circleci/node:14.16.1-browsers
<<: *desktop_defaults
shell: /bin/bash --login
steps:
@@ -847,7 +486,7 @@ jobs:
# Otherwise only build application executable required for end-to-end testing.
! git diff --name-only origin/trunk...HEAD | grep -E -q 'desktop/package.json|desktop/yarn.lock' && ELECTRON_BUILDER_ARGS='-c.linux.target=dir'
- ELECTRON_BUILDER_ARGS=$ELECTRON_BUILDER_ARGS yarn run build-desktop:app
+ ELECTRON_BUILDER_ARGS=$ELECTRON_BUILDER_ARGS yarn run build-desktop
- run:
name: e2e Tests
command: |
@@ -934,6 +573,7 @@ jobs:
If ( -Not $(git diff --name-only origin/trunk...HEAD | Select-String -Pattern desktop/package.json,desktop/yarn.lock) ) { $env:ARG2='-c.win.target=dir' }
+ make -f desktop/Makefile build-main
make -f desktop/Makefile package ELECTRON_BUILDER_ARGS=$($env:ARG1,$env:ARG2 -join " ")
- run:
name: Archive Unpacked Directories
@@ -968,7 +608,7 @@ jobs:
# GitHub release and generate the release notes using the Git commits history
wp-desktop-publish:
docker:
- - image: circleci/golang:1.12
+ - image: circleci/golang:1.12-node
working_directory: /home/circleci/wp-calypso
environment:
VERSION: << pipeline.git.tag >>
@@ -979,9 +619,14 @@ jobs:
- run:
name: Install Dependencies
command: go get github.com/tcnksm/ghr
+ - run:
+ name: Update wp-desktop repo README
+ command: |
+ node desktop/bin/github/update-desktop-repo-readme.js
- run:
name: Publish Github Release
command: |
+ VERSION="${VERSION#desktop-}"
echo "Publishing draft release for wp-desktop $VERSION..."
NAME="WP-Desktop ${VERSION#?}"
@@ -989,10 +634,10 @@ jobs:
./desktop/bin/make-changelog.sh > desktop/CHANGELOG.md
ghr \
- --token "${GH_TOKEN}" \
+ --token "${WP_DESKTOP_SECRET}" \
--username "${CIRCLE_PROJECT_USERNAME}" \
- --repository "${CIRCLE_PROJECT_REPONAME}" \
- --commitish "${CIRCLE_SHA1}" \
+ --repository "wp-desktop" \
+ --commitish "trunk" \
--name "${NAME}" \
--body "$(cat desktop/CHANGELOG.md)" \
--delete \
@@ -1006,151 +651,70 @@ workflows:
calypso:
jobs:
- setup
- - prime-calypso-live:
- filters:
- branches:
- ignore: trunk
- - build-notifications:
- requires:
- - setup
- filters:
- branches:
- only:
- # Only run for fork pull requets.
- - /pull\/[0-9]+/
- - build-o2-blocks:
- requires:
- - setup
- filters:
- branches:
- only:
- # Only run for fork pull requets.
- - /pull\/[0-9]+/
- - build-wpcom-block-editor:
- requires:
- - setup
- filters:
- branches:
- only:
- # Only run for fork pull requets.
- - /pull\/[0-9]+/
- translate:
requires:
- setup
- - lint:
- requires:
- - setup
- filters:
- branches:
- only:
- # Only run for fork pull requets.
- - /pull\/[0-9]+/
- - test-client:
- requires:
- - setup
- filters:
- branches:
- only:
- # Only run for fork pull requets.
- - /pull\/[0-9]+/
- - test-packages:
- requires:
- - setup
+ wp-desktop:
+ jobs:
+ - wp-desktop-assets:
filters:
branches:
only:
- # Only run for fork pull requets.
- - /pull\/[0-9]+/
- - test-server:
+ - trunk
+ - /release\/.*/
+ - /desktop\/.*/
+ - wp-desktop-mac:
requires:
- - setup
+ - wp-desktop-assets
filters:
branches:
only:
- # Only run for fork pull requets.
- - /pull\/[0-9]+/
- - typecheck-strict:
+ - trunk
+ - /release\/.*/
+ - /desktop\/.*/
+ - wp-desktop-linux:
requires:
- - setup
+ - wp-desktop-assets
filters:
branches:
only:
- # Only run for fork pull requets.
- - /pull\/[0-9]+/
- - wait-calypso-live:
- requires:
- - setup
- filters:
- branches:
- ignore:
- # Do not spin up calypso.live for `trunk`
- trunk
- # Do not spin up calypso.live for fork pull requests. Calypso.live will not build them.
- - /pull\/[0-9]+/
- # - test-e2e-canary:
- # requires:
- # - wait-calypso-live
- # test-flags: '-C -S $CIRCLE_SHA1'
- - test-e2e-canary:
- name: test-e2e-canary-ie
- requires:
- - wait-calypso-live
- test-flags: '-z -S $CIRCLE_SHA1'
- test-target: 'IE11'
- slack-webhook: '$SLACK_IE'
- - test-e2e-canary:
- name: test-e2e-canary-safari
+ - /release\/.*/
+ - /desktop\/.*/
+ - wp-desktop-windows:
requires:
- - wait-calypso-live
- test-flags: '-y -S $CIRCLE_SHA1'
- wp-desktop:
- jobs:
- - wp-desktop-source:
+ - wp-desktop-assets
filters:
branches:
only:
- trunk
- /release\/.*/
- /desktop\/.*/
- - wp-desktop-mac:
- requires:
- - wp-desktop-source
- # Even though a TeamCity Linux job is ran against trunk,
- # we should continue to periodically validate the Circle
- # job to ensure CircleCI continues to work on all
- # platforms since the application is deployed via CircleCI.
- # This also provides a benchmark and fallback for TeamCity.
- - wp-desktop-linux:
- requires:
- - wp-desktop-source
- - wp-desktop-windows:
- requires:
- - wp-desktop-source
wp-desktop-release:
when: << pipeline.git.tag >>
jobs:
- - wp-desktop-source:
+ - wp-desktop-assets:
filters:
tags:
- only: /v.*/
+ only: /desktop-v.*/
- wp-desktop-mac:
requires:
- - wp-desktop-source
+ - wp-desktop-assets
filters:
tags:
- only: /v.*/
+ only: /desktop-v.*/
- wp-desktop-linux:
requires:
- - wp-desktop-source
+ - wp-desktop-assets
filters:
tags:
- only: /v.*/
+ only: /desktop-v.*/
- wp-desktop-windows:
requires:
- - wp-desktop-source
+ - wp-desktop-assets
filters:
tags:
- only: /v.*/
+ only: /desktop-v.*/
- wp-desktop-publish:
requires:
- wp-desktop-mac
@@ -1158,119 +722,7 @@ workflows:
- wp-desktop-windows
filters:
tags:
- only: /v.*/
- calypso-nightly:
- jobs:
- - setup
- - test-client:
- requires:
- - setup
- - test-integration:
- requires:
- - setup
- - test-packages:
- requires:
- - setup
- - test-server:
- requires:
- - setup
- triggers:
- - schedule:
- cron: '0 4 * * *'
- filters:
- branches:
- only:
- - trunk
-
- e2e-full-suite-scheduled:
- jobs:
- - setup
- - test-e2e:
- requires:
- - setup
- triggers:
- - schedule:
- cron: '0 3,15 * * *'
- filters:
- branches:
- only: trunk
-
- e2e-canary-scheduled:
- jobs:
- - setup
- - test-e2e-canary:
- name: test-e2e-canary-ie-sched
- requires:
- - setup
- test-flags: '-w'
- test-target: 'IE11'
- slack-webhook: '$SLACK_IE'
- - test-e2e-canary:
- name: test-e2e-canary-woo-sched
- requires:
- - setup
- test-flags: '-W'
- test-target: 'WOO'
- slack-webhook: '$SLACK_WOO'
- triggers:
- - schedule:
- cron: '0 12 * * *'
- filters:
- branches:
- only: trunk
-
- e2e-full-suite-edge-scheduled:
- jobs:
- - setup
- - test-e2e-canary:
- name: test-e2e-full-suite-edge
- requires:
- - setup
- test-flags: '-g'
- env-vars: 'SKIP_DOMAIN_TESTS=true GUTENBERG_EDGE=true'
- triggers:
- - schedule:
- cron: '30 8 * * *'
- filters:
- branches:
- only: trunk
-
- e2e-jetpack-be-scheduled:
- jobs:
- - setup
- - test-e2e-canary:
- name: test-e2e-jetpack
- requires:
- - setup
- test-flags: '-j -s desktop'
- jetpack-host: 'PRESSABLEBLEEDINGEDGE'
- test-target: 'JETPACK'
- slack-webhook: '$SLACK_JP'
- triggers:
- - schedule:
- cron: '0 7 * * *'
- filters:
- branches:
- only: trunk
-
- # Temporarily disabling these scheduled test runs
- # e2e-jetpack-scheduled:
- # jobs:
- # - setup
- # - test-e2e-canary:
- # name: test-e2e-jetpack
- # requires:
- # - setup
- # test-flags: "-j"
- # jetpack-host: "PRESSABLE"
- # test-target: "JETPACK"
- # slack-webhook: "$SLACK_JP"
- # triggers:
- # - schedule:
- # cron: "0 1,13 * * *"
- # filters:
- # branches:
- # only: trunk
+ only: /desktop-v.*/
e2e-canary-i18n-monthly:
jobs:
diff --git a/.eslintrc.js b/.eslintrc.js
index b39b9b9f97d2e..21a91f443e1ea 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,14 +1,19 @@
const { merge } = require( 'lodash' );
const reactVersion = require( './client/package.json' ).dependencies.react;
+const path = require( 'path' );
module.exports = {
root: true,
+ parserOptions: {
+ babelOptions: {
+ configFile: path.join( __dirname, './babel.config.js' ),
+ },
+ },
extends: [
'plugin:wpcalypso/react',
'plugin:jsx-a11y/recommended',
'plugin:jest/recommended',
'plugin:prettier/recommended',
- 'prettier/react',
'plugin:md/prettier',
'plugin:@wordpress/eslint-plugin/i18n',
],
@@ -47,20 +52,8 @@ module.exports = {
files: [ 'packages/**/*' ],
rules: {
// These two rules are to ensure packages don't import from calypso by accident to avoid circular deps.
- 'no-restricted-imports': [
- 'error',
- {
- patterns: [ 'calypso/*' ],
- message: "Packages shouldn't import from calypso",
- },
- ],
- 'no-restricted-modules': [
- 'error',
- {
- patterns: [ 'calypso/*' ],
- message: "Packages shouldn't import from calypso",
- },
- ],
+ 'no-restricted-imports': [ 'error', { patterns: [ 'calypso/*' ] } ],
+ 'no-restricted-modules': [ 'error', { patterns: [ 'calypso/*' ] } ],
},
},
{
@@ -73,9 +66,20 @@ module.exports = {
},
},
{
- files: [ 'test/e2e/**/*' ],
+ plugins: [ 'mocha' ],
+ files: [
+ 'test/e2e/**/*',
+ 'packages/magellan-mocha-plugin/test/**/*',
+ 'packages/magellan-mocha-plugin/test_support/**/*',
+ ],
rules: {
'import/no-nodejs-modules': 'off',
+ 'mocha/no-exclusive-tests': 'error',
+ 'mocha/handle-done-callback': [ 'error', { ignoreSkipped: true } ],
+ 'mocha/no-global-tests': 'error',
+ 'mocha/no-async-describe': 'error',
+ 'mocha/no-top-level-hooks': 'error',
+ 'mocha/max-top-level-suites': [ 'error', { limit: 1 } ],
'no-console': 'off',
// Disable all rules from "plugin:jest/recommended", as e2e tests use mocha
...Object.keys( require( 'eslint-plugin-jest' ).configs.recommended.rules ).reduce(
@@ -102,7 +106,7 @@ module.exports = {
.overrides[ 0 ].rules,
},
// Prettier rules config
- require( 'eslint-config-prettier/@typescript-eslint' ),
+ require( 'eslint-config-prettier' ),
// Our own overrides
{
files: [ '**/*.ts', '**/*.tsx' ],
@@ -151,6 +155,12 @@ module.exports = {
'@typescript-eslint/no-var-requires': 'off',
// REST API objects include underscores
'@typescript-eslint/camelcase': 'off',
+
+ // TypeScript compiler already takes care of these errors
+ 'import/no-extraneous-dependencies': 'off',
+ 'import/named': 'off',
+ 'import/namespace': 'off',
+ 'import/default': 'off',
},
}
),
@@ -212,7 +222,7 @@ module.exports = {
// this is when Webpack last built the bundle
BUILD_TIMESTAMP: true,
},
- plugins: [ 'import' ],
+ plugins: [ 'import', 'you-dont-need-lodash-underscore' ],
settings: {
react: {
version: reactVersion,
@@ -272,8 +282,6 @@ module.exports = {
2,
{
paths: [
- // Error if any module depends on the data-observe mixin, which is deprecated.
- 'lib/mixins/data-observe',
// Prevent naked import of gridicons module. Use 'components/gridicon' instead.
{
name: 'gridicons',
@@ -309,8 +317,6 @@ module.exports = {
2,
{
paths: [
- // Error if any module depends on the data-observe mixin, which is deprecated.
- 'lib/mixins/data-observe',
// Prevent naked import of gridicons module. Use 'components/gridicon' instead.
{
name: 'gridicons',
@@ -376,11 +382,21 @@ module.exports = {
// Force packages to declare their dependencies
'import/no-extraneous-dependencies': 'error',
+ 'import/named': 'error',
+ 'import/namespace': 'error',
+ 'import/default': 'error',
+ 'import/no-duplicates': 'error',
'wpcalypso/no-unsafe-wp-apis': [
'error',
{
- '@wordpress/block-editor': [ '__experimentalBlock', '__experimentalInserterMenuExtension' ],
+ '@wordpress/block-editor': [
+ '__experimentalBlock',
+ // InserterMenuExtension has been made unstable in this PR: https://github.com/WordPress/gutenberg/pull/31417 / Gutenberg v10.7.0-rc.1.
+ // We need to support both symbols until we're sure Gutenberg < v10.7.x is not used anymore in WPCOM.
+ '__unstableInserterMenuExtension',
+ '__experimentalInserterMenuExtension',
+ ],
'@wordpress/date': [ '__experimentalGetSettings' ],
'@wordpress/edit-post': [ '__experimentalMainDashboardButton' ],
'@wordpress/components': [ '__experimentalNavigationBackButton' ],
@@ -389,5 +405,53 @@ module.exports = {
// Disabled, because in packages we are using globally defined `__i18n_text_domain__` constant at compile time
'@wordpress/i18n-text-domain': 'off',
+
+ // Disable Lodash methods that we've already migrated away from, see p4TIVU-9Bf-p2 for more details.
+ 'you-dont-need-lodash-underscore/all': 'error',
+ 'you-dont-need-lodash-underscore/any': 'error',
+ 'you-dont-need-lodash-underscore/assign': 'error',
+ 'you-dont-need-lodash-underscore/bind': 'error',
+ 'you-dont-need-lodash-underscore/cast-array': 'error',
+ 'you-dont-need-lodash-underscore/collect': 'error',
+ 'you-dont-need-lodash-underscore/contains': 'error',
+ 'you-dont-need-lodash-underscore/detect': 'error',
+ 'you-dont-need-lodash-underscore/drop': 'error',
+ 'you-dont-need-lodash-underscore/drop-right': 'error',
+ 'you-dont-need-lodash-underscore/each': 'error',
+ 'you-dont-need-lodash-underscore/ends-with': 'error',
+ 'you-dont-need-lodash-underscore/entries': 'error',
+ 'you-dont-need-lodash-underscore/every': 'error',
+ 'you-dont-need-lodash-underscore/extend-own': 'error',
+ 'you-dont-need-lodash-underscore/fill': 'error',
+ 'you-dont-need-lodash-underscore/first': 'error',
+ 'you-dont-need-lodash-underscore/foldl': 'error',
+ 'you-dont-need-lodash-underscore/foldr': 'error',
+ 'you-dont-need-lodash-underscore/index-of': 'error',
+ 'you-dont-need-lodash-underscore/inject': 'error',
+ 'you-dont-need-lodash-underscore/is-array': 'error',
+ 'you-dont-need-lodash-underscore/is-finite': 'error',
+ 'you-dont-need-lodash-underscore/is-function': 'error',
+ 'you-dont-need-lodash-underscore/is-integer': 'error',
+ 'you-dont-need-lodash-underscore/is-nan': 'error',
+ 'you-dont-need-lodash-underscore/is-nil': 'error',
+ 'you-dont-need-lodash-underscore/is-null': 'error',
+ 'you-dont-need-lodash-underscore/is-string': 'error',
+ 'you-dont-need-lodash-underscore/is-undefined': 'error',
+ 'you-dont-need-lodash-underscore/join': 'error',
+ 'you-dont-need-lodash-underscore/last-index-of': 'error',
+ 'you-dont-need-lodash-underscore/pad-end': 'error',
+ 'you-dont-need-lodash-underscore/pad-start': 'error',
+ 'you-dont-need-lodash-underscore/reduce-right': 'error',
+ 'you-dont-need-lodash-underscore/repeat': 'error',
+ 'you-dont-need-lodash-underscore/replace': 'error',
+ 'you-dont-need-lodash-underscore/reverse': 'error',
+ 'you-dont-need-lodash-underscore/select': 'error',
+ 'you-dont-need-lodash-underscore/slice': 'error',
+ 'you-dont-need-lodash-underscore/split': 'error',
+ 'you-dont-need-lodash-underscore/take-right': 'error',
+ 'you-dont-need-lodash-underscore/to-lower': 'error',
+ 'you-dont-need-lodash-underscore/to-pairs': 'error',
+ 'you-dont-need-lodash-underscore/to-upper': 'error',
+ 'you-dont-need-lodash-underscore/uniq': 'error',
},
};
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 87384e57ab515..ad863b7f95e38 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -15,26 +15,27 @@
# Customer Home
/client/my-sites/customer-home @Automattic/manage
-# G Suite
-/client/components/data/query-gsuite-users @Automattic/cobalt
-/client/components/domains/contact-details-form-fields/index.jsx @Automattic/cobalt
-/client/components/gsuite @Automattic/cobalt
-/client/components/marketing-survey/gsuite-cancel-purchase-dialog @Automattic/cobalt
-/client/components/upgrades/gsuite @Automattic/cobalt
-/client/lib/domains/email-forwarding @Automattic/cobalt
-/client/lib/gsuite @Automattic/cobalt
-/client/me/purchases/remove-purchase/index.jsx @Automattic/cobalt
-/client/my-sites/checkout/checkout-thank-you/google-apps-details.jsx @Automattic/cobalt
-/client/my-sites/checkout/checkout-thank-you/index.jsx @Automattic/cobalt
-/client/my-sites/checkout/checkout/domain-details-form.jsx @Automattic/cobalt
-/client/my-sites/checkout/checkout/index.jsx @Automattic/cobalt
-/client/my-sites/checkout/controller.jsx @Automattic/cobalt
-/client/my-sites/checkout/gsuite-nudge @Automattic/cobalt
-/client/my-sites/domains/components/domain-warnings @Automattic/cobalt
-/client/my-sites/domains/controller.jsx @Automattic/cobalt
-/client/my-sites/email @Automattic/cobalt
-/client/state/data-layer/wpcom/gsuite-users @Automattic/cobalt
-/client/state/gsuite-users @Automattic/cobalt
+# Email services
+/client/components/data/query-gsuite-users @Automattic/letero
+/client/components/domains/contact-details-form-fields/index.jsx @Automattic/letero
+/client/components/gsuite @Automattic/letero
+/client/components/marketing-survey/gsuite-cancel-purchase-dialog @Automattic/letero
+/client/components/upgrades/gsuite @Automattic/letero
+/client/lib/domains/email-forwarding @Automattic/letero
+/client/lib/gsuite @Automattic/letero
+/client/lib/titan @Automattic/letero
+/client/me/purchases/remove-purchase/index.jsx @Automattic/letero
+/client/my-sites/checkout/checkout-thank-you/google-apps-details.jsx @Automattic/letero
+/client/my-sites/checkout/checkout-thank-you/index.jsx @Automattic/letero
+/client/my-sites/checkout/checkout/domain-details-form.jsx @Automattic/letero
+/client/my-sites/checkout/checkout/index.jsx @Automattic/letero
+/client/my-sites/checkout/controller.jsx @Automattic/letero
+/client/my-sites/checkout/gsuite-nudge @Automattic/letero
+/client/my-sites/domains/components/domain-warnings @Automattic/letero
+/client/my-sites/domains/controller.jsx @Automattic/letero
+/client/my-sites/email @Automattic/letero
+/client/state/data-layer/wpcom/gsuite-users @Automattic/letero
+/client/state/gsuite-users @Automattic/letero
# Payments
/client/blocks/credit-card-form/ @Automattic/shilling
@@ -67,6 +68,7 @@
/packages/composite-checkout/ @Automattic/shilling
/packages/calypso-stripe/ @Automattic/shilling
/packages/shopping-cart/ @Automattic/shilling
+/packages/wpcom-checkout/ @Automattic/shilling
# Reader
/client/reader @Automattic/reader
@@ -82,6 +84,7 @@
/apps/editing-toolkit/editing-toolkit-plugin/dotcom-fse @Automattic/cylon
/apps/editing-toolkit/editing-toolkit-plugin/posts-list-block @Automattic/ajax
/apps/editing-toolkit/editing-toolkit-plugin/global-styles @Automattic/cylon @nosolosw
+/apps/editing-toolkit/editing-toolkit-plugin/block-patterns @Automattic/dotcom-view-design
# Editing Toolkit Workflow Files
/.github/workflows/editing-toolkit-plugin.yml @noahtallen
@@ -89,7 +92,40 @@
# Experimentation platform legacy library and new client
/client/lib/abtest @Automattic/experimentation-platform
-/client/components/data/query-experiments @Automattic/experimentation-platform
-/client/components/experiment @Automattic/experimentation-platform
-/client/state/data-layer/wpcom/experiments @Automattic/experimentation-platform
-/client/state/experiments @Automattic/experimentation-platform
+/client/lib/explat @Automattic/experimentation-platform
+/packages/explat-* @Automattic/experimentation-platform
+
+# Framework
+/packages/js-utils @Automattic/team-calypso-frameworks
+
+# Jetpack Search
+/client/my-sites/jetpack-search @Automattic/jetpack-search
+
+# TeamCity configuration
+/.teamcity @Automattic/team-calypso-platform
+
+# I18n
+/bin/build-languages.js @Automattic/i18n
+/build-tools/webpack/generate-chunks-map-plugin.js @Automattic/i18n
+/build-tools/webpack/require-chunk-callback-plugin.js @Automattic/i18n
+/client/boot/locale.js @Automattic/i18n
+/client/components/calypso-i18n-provider @Automattic/i18n
+/client/components/community-translator @Automattic/i18n
+/client/components/language-picker @Automattic/i18n
+/client/components/locale-suggestions @Automattic/i18n
+/client/components/localized-moment @Automattic/i18n
+/client/components/translatable @Automattic/i18n
+/client/components/translator-invite @Automattic/i18n
+/client/layout/community-translator @Automattic/i18n
+/client/lib/i18n-utils @Automattic/i18n
+/client/state/i18n @Automattic/i18n
+/packages/babel-plugin-i18n-calypso @Automattic/i18n
+/packages/i18n-calypso @Automattic/i18n
+/packages/i18n-calypso-cli @Automattic/i18n
+/packages/i18n-utils @Automattic/i18n
+/packages/language-picker @Automattic/i18n
+/packages/languages @Automattic/i18n
+
+# E2E specs
+/test/e2e @WunderBart @scinos
+/packages/calypso-e2e @worldomonation
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index f3e04e610f1ff..6a259b3e1f3b8 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
-labels: Feature request
+labels: "[Type] Feature Request"
assignees: ''
---
diff --git a/.github/ISSUE_TEMPLATE/flaky-e2e-spec-report.md b/.github/ISSUE_TEMPLATE/flaky-e2e-spec-report.md
new file mode 100644
index 0000000000000..08b9816d2ddbf
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/flaky-e2e-spec-report.md
@@ -0,0 +1,23 @@
+---
+name: Flaky E2E spec report
+about: Noticed an erratic E2E spec? Report it!
+title: 'E2E: Flaky spec report'
+labels: Flaky e2e
+assignees: ''
+
+---
+
+
+
+This spec seems to be flaky so let's try to fix it.
+
+#### Failing spec details
+
+From test test
Did you find this guide helpful?
++ { __( 'Did you find this guide helpful?', 'full-site-editing' ) } +
- { this.props.translate( - 'Welcome to Calypso. Authorize the application with your WordPress.com credentials to get started.' - ) } -
-- - { translate( 'Lost your password?' ) } - -
- ); -} diff --git a/client/auth/self-hosted-instructions.jsx b/client/auth/self-hosted-instructions.jsx deleted file mode 100644 index 98d5455ff13d3..0000000000000 --- a/client/auth/self-hosted-instructions.jsx +++ /dev/null @@ -1,49 +0,0 @@ -/** - * External dependencies - */ - -import React from 'react'; -import { useTranslate } from 'i18n-calypso'; -import Gridicon from 'calypso/components/gridicon'; - -export default function SelfHostedInstructions( { onClickClose } ) { - const translate = useTranslate(); - - return ( -- { translate( - 'By default when you sign into the WordPress.com app, you can edit blogs and sites hosted at WordPress.com' - ) } -
-- { translate( - "If you'd like to edit your self-hosted WordPress blog or site, you can do that by following these instructions:" - ) } -
- -+ { value } ++
+