Commit Graph

478 Commits

Author SHA1 Message Date
Daniel Lockyer
54e1b6002d Switched to Nx for more project commands
refs https://github.com/TryGhost/DevOps/issues/104

- this should marginally speed things up because we don't have to go
  through `yarn`, which is notoriously slow
2023-11-15 10:11:22 +01:00
Jono M
94a181ce2a
Separated common AdminX logic into a reusable package (#18919)
refs https://github.com/TryGhost/Product/issues/4123

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at a420f0b</samp>

This pull request moves most of the API-related types and functions from
the `admin-x-settings` package to the `admin-x-framework` package, which
is a new library of common utilities and hooks for the admin-x apps. It
also adds some configuration files, such as `.eslintrc.cjs` and
`.gitignore`, to the `admin-x-framework` package. Additionally, it
exports the `FetchKoenigLexical` type from the `admin-x-design-system`
package, which is used by the `HtmlEditor` component.
2023-11-14 13:50:08 +00:00
Jono M
67251e6e1d
Renamed admin-x-design to admin-x-design-system for clarity (#18914)
refs https://github.com/TryGhost/Product/issues/4105
2023-11-08 15:10:43 +00:00
Jono M
048dac30ed
Extracted AdminX design system to a separate package (#18878)
refs https://github.com/TryGhost/Product/issues/4105

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 2edba98</samp>

This pull request introduces a new monorepo package called
`admin-x-design`, which contains components, design guidelines and
documentation for building apps in Ghost Admin. It also moves some
existing components and files from the deprecated `admin-x-settings`
package to the new `admin-x-design` package, and updates some styles and
rules to use TailwindCSS. The purpose of these changes is to improve the
consistency, maintainability and usability of the Ghost Admin UI.
2023-11-08 12:33:18 +00:00
renovate[bot]
3909de2f17 Update actions/setup-node action to v4 2023-11-08 13:29:13 +01:00
Daniel Lockyer
6900c1f2b3 Configured CI to run Ghost-CLI tests on Node 18
refs https://github.com/TryGhost/DevOps/issues/75

- this will install v4 using Node v16 and then switch to v18 as we're
  about to drop support for Node v16
2023-10-25 17:50:56 +02:00
Daniel Lockyer
f6dfe05c30 Added guard against non-code changes to run CI tests
- we don't want to run browser tests if no code has changed
2023-10-25 12:06:00 +02:00
Daniel Lockyer
c5c6f84c7d Added CI check to ensure i18n translations are in sync
fixes https://github.com/TryGhost/DevOps/issues/91

- this adds a CI job that will run i18n tests if any of the packages
  that use it have changed
- this helps prevent translations from going out of sync
2023-10-25 12:06:00 +02:00
John O'Nolan
67b6d7cd15
Added contributor code of conduct 2023-10-18 12:10:05 +02:00
Sam Lord
11b9e8a73f Switch to 4-core runners for browser tests
refs: https://github.com/TryGhost/DevOps/issues/78

This number of cores has been approved, will test with 1 browser per core, and 1 browser for every two cores
2023-10-17 12:40:19 +01:00
Daniel Lockyer
e699facc03 Cleaned path to Playwright reports
- this is cleaner and follows the pattern as other jobs do
2023-10-16 17:37:42 +02:00
Daniel Lockyer
18f55d6af0 Moved browser E2E tests into CI workflow
refs https://github.com/TryGhost/DevOps/issues/78

- this allows us to take advantage of the dependency caching and metadata
  workflows, to reduce the overall execution time and duplicate logic
2023-10-16 13:45:22 +02:00
Sam Lord
4815aa6e7f
Parallelise browser tests
refs: https://github.com/TryGhost/DevOps/issues/78

Re-introduce parallel browser tests

These were adding in a previous PR, but the difference between local
running tests and using CI introduced failures.

Added additional fixes to ensure the Stripe API key is used in the CLI when running in CI.
2023-10-13 11:42:39 +00:00
renovate[bot]
c2b0442846 Update peter-evans/create-or-update-comment digest to ac8e650 2023-10-13 07:48:15 +02:00
Peter Zimon
e68db848dc
AdminX: reroute settings-x to settings (#18360)
refs. https://github.com/TryGhost/Product/issues/3949

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-10-09 08:12:46 +01:00
renovate[bot]
d6c944c8b8 Update peter-evans/create-or-update-comment digest to e3645dd 2023-10-06 10:36:02 +02:00
Daniel Lockyer
639be25f1d Updated Koenig-Lexical bundling
refs https://github.com/TryGhost/DevOps/issues/83

- this will now continue use the dev server assets if we tell it to,
  or copy the dependency package files to the built folder otherwise
- removes `editor` from config API because it's no longer needed
- removes dependency on `editor.url` in tests, as this no longer exists
- edits dev script to pass dev server URL as env var
- adds `@tryghost/koenig-lexical` dependency to Admin
2023-10-04 12:50:21 +02:00
Ronald Langeveld
a596b3aaca
Renamed e2e tests to acceptance tests in Admin X (#18439)
ref https://www.notion.so/AdminX-testing-plan-99b2dab27e794fc893767ccd01c84a63?d=26612fc2b9d84e65bbb269fa3bc5079e&pvs=4#f0089cd4d9f24e93bd7f8e2868987bf6

This pull request renames the end-to-end tests to acceptance tests in
the `apps/admin-x-settings` folder. It updates the `ci.yml` file, the
`package.json` file, the `playwright.config.ts` file, and the test files
to reflect the new naming convention. This change aims to better reflect
the purpose and scope of the tests.
2023-10-03 16:20:40 +07:00
Daniel Lockyer
62eb8604fa Fixed uploading Playwright reports
- this was previously broken because the paths were incorrect
2023-10-03 08:56:06 +02:00
Daniel Lockyer
0372bf8e50 Switched yarn workspace to yarn nx run ...
- this switches to NX for more command-execution, which helps in the
  future because we can configure dependent tasks that are also
  cacheable
2023-10-03 08:56:06 +02:00
Daniel Lockyer
95ec7b5016 Enabled --adminx by default
refs https://ghost.slack.com/archives/C0568LN2CGJ/p1695897183996699

- Admin-X Settings is soon due to be the official new settings, so we
  should always ensure it's running for developers
2023-09-28 12:49:34 +02:00
renovate[bot]
d5e00f3ff6 Update peter-evans/create-or-update-comment digest to ddff993 2023-09-27 09:35:39 +02:00
Simon Backx
b51e12d90f
Added emails for recommendations (#18361)
fixes https://github.com/TryGhost/Product/issues/3938
2023-09-26 15:29:17 +00:00
renovate[bot]
11e6e32888 Update peter-evans/create-or-update-comment digest to 46da6c0 2023-09-20 10:57:44 +02:00
Daniel Lockyer
f705dda314 Updated Admin-X bundling process
refs https://github.com/TryGhost/DevOps/issues/80

- as part of moving Admin-X-Setting towards GA, we want to change it from
  loading the settings externally via a CDN, to bundling it in with
  Admin
- the bulk of the changes here are removing the config in Ghost, setting
  up the copy to the Admin assets dir, and loading the new path in Admin
- several other changes have come along the way as I've cleaned up
  unneeded code
2023-09-19 11:31:55 +02:00
Daniel Lockyer
e8a0d5a300 Deleted custom-build workflow
- this is no longer needed because we added support to build from a
  branch
2023-09-15 10:48:08 +02:00
renovate[bot]
3694a080d2 Update peter-evans/create-or-update-comment digest to 1f6c514 2023-09-15 10:10:56 +02:00
renovate[bot]
af2459c863 Update peter-evans/create-or-update-comment digest to 1939f16 2023-09-14 15:15:43 +02:00
Daniel Lockyer
acb182c785 Dropped Node 16 from CI matrix tests
refs https://github.com/TryGhost/DevOps/issues/75

- Node 16 has gone EOL so we can from support for it from our matrix
  tests
- dropping support in some other tests and in general will come in
  future commits
2023-09-13 15:47:56 +02:00
Daniel Lockyer
f48b732ef1 Removed GitHub PR auto-assign workflow
- we no longer need this because Renovate should be automerging a lot
  more, and it causes less noise for me
2023-09-13 11:45:01 +02:00
renovate[bot]
e8b175c574 Update peter-evans/create-or-update-comment digest to 223779b 2023-09-12 15:53:02 +02:00
renovate[bot]
da38227105 Update peter-evans/create-or-update-comment digest to 46846e5 2023-09-12 12:31:10 +02:00
Jono M
9e45afddb8
Updated AdminX to load via ES Modules to enable code splitting (#17971)
refs https://github.com/TryGhost/Product/issues/3349
2023-09-07 06:38:20 +00:00
renovate[bot]
d3db3b32d2 Update actions/checkout action to v4 2023-09-05 14:29:11 +02:00
Daniel Lockyer
d4b717493c Migrated to Actions trigger-metric workflow
refs https://github.com/TryGhost/DevOps/issues/70

- I've moved the code and history into the Actions repo to keep these
  things more maintainable
- this commit updates the reference to the action
2023-09-04 13:24:39 +02:00
Simon Backx
8600ccf387 Added BookshelfRepository and BookshelfRecommendationRepository
refs https://github.com/TryGhost/Product/issues/3800
2023-09-01 15:10:34 +02:00
renovate[bot]
754ee583e5 Update peter-evans/create-or-update-comment digest to 94ff342 2023-08-30 13:47:38 +02:00
Simon Backx
c298dd5d38
Added support to run Admin-X development over HTTPS in Safari (#17866)
no issue

Safari requires HTTPs for admin X to work in development mode.

Use `yarn dev --https` in combination with a caddy server to make it
work.

```
https://localhost:41740 {
	reverse_proxy http://localhost:4174
}
```
2023-08-30 08:12:15 +00:00
Simon Backx
935ac43584
Added recommendations CRUD api (#17845)
fixes https://github.com/TryGhost/Product/issues/3784

- Includes migrations for new permissions needed for the new endpoints
2023-08-29 15:06:57 +00:00
Daniel Lockyer
3959c00e5e Updated path to label-actions package
refs https://github.com/TryGhost/DevOps/issues/67

- this now lives in the Actions repo to cut down on maintenance cost
2023-08-29 13:46:17 +01:00
renovate[bot]
0d0dc81299
Update peter-evans/create-or-update-comment digest to 8c21c80 (#17849)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-29 10:04:01 +02:00
renovate[bot]
457b355dce
Update peter-evans/create-or-update-comment digest to bb291f6 (#17734)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-29 09:26:22 +02:00
Simon Backx
f1b51729fc
Converted Comments-UI App to TypeScript and React hooks (#17760)
refs https://github.com/TryGhost/Product/issues/3504

- App component now uses React hooks intead of React class component
- App is now written in TypeScript
- All JavaScript is now removed from the Comments-UI project
- Removed `PopupNotification` because these were never displayed
- Removed `action` from AppContext (never used)
- Moved options parsing out of `index.ts` into a separate utility file,
similar to the signup-form
- Improved reliability of some editor tests by always waiting for the
editor to be focused (was not always the case) + added an utility method
for this
2023-08-18 13:30:59 +00:00
Daniel Lockyer
fd95eac710 Hardcoded success criteria for running canary job
refs https://github.com/TryGhost/DevOps/issues/57

- I'm not sure why but I think the `contains` are doing funky things
  and not allowing the build to run when we expect it to
- switching to a slightly different if-statement should help with that
2023-08-11 17:20:32 +02:00
Daniel Lockyer
b60d5bbe06 Added debugging to diagnose cause of skipped canary builds
refs https://github.com/TryGhost/DevOps/issues/57

- this should help us find out why canary builds are skipped in some
  circumstances
2023-08-11 10:23:10 +02:00
renovate[bot]
4139a0cadd Update peter-evans/create-or-update-comment digest to 5f22cb8 2023-08-11 09:11:18 +02:00
renovate[bot]
a28d6f780a Update peter-evans/create-or-update-comment digest to 38217c6 2023-08-09 13:19:17 +02:00
Daniel Lockyer
64af4e2742 Added more debugging to find cause of skipped canary tests
refs https://github.com/TryGhost/DevOps/issues/57

- adds a step to output the `needs` context
- adds `cancelled` as a "failed" step because it means we haven't run
  all the tests
- unfortunately there's no way to assert all elements are one type
  (success), so we have to check for existence of the negative ones
2023-08-09 12:58:56 +02:00
Sam Lord
116d11b6ab Allows unknown local cache when testing with Nx
refs: https://github.com/TryGhost/DevOps/issues/55

The documentation for this feature is here: https://nx.dev/recipes/troubleshooting/unknown-local-cache

Ideally, we'd use a remote cache, but we can just share to local cache since it's being shared by identical machines.
2023-08-08 17:57:33 +01:00
Fabien 'egg' O'Carroll
2b9e322b3e
Reverted "Disabled the Ghost-CLI Github Action" (#17562)
This reverts commit 5103b58c0c.

- We only disabled this so that we could release v5.57.1
2023-08-01 20:21:10 +00:00