Commit Graph

542 Commits

Author SHA1 Message Date
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
Ghost CI
f839c2289c Merged v5.57.1 into main 2023-08-01 19:57:00 +00:00
Fabien "egg" O'Carroll
5103b58c0c Disabled the Ghost-CLI Github Action
This action was failing and stopping us from releasing a patch release.
The failure was a false negative, and due to what we believe is a cache issue.
2023-08-01 20:44:04 +01:00
Naz
f4143a8939 Fixed build scripts for post-events package 2023-08-01 15:11:00 +08:00
Simon Backx
841e52ccfe
Added donations API (#17495)
refs https://github.com/TryGhost/Product/issues/3648

- Refactored Members API RouterController.createCheckoutSession: Split the method into smaller parts so we can reuse individual parts for the upcoming donation checkout session.
- Wired up donation checkout creation
- Added donation events
2023-07-31 16:00:52 +00:00
Daniel Lockyer
58cfa6ff15 Updated dependency cache keys
- this should now restore from a shared cache but update a unique cache
  for use within the rest of the jobs
2023-07-28 10:11:52 +02:00
Daniel Lockyer
13c8a26ea4 Fixed dependency cache key with new package
- in the event there is a new package, we need to completely reset the
  cache key otherwise `yarn` won't link the packages correctly
2023-07-27 22:33:46 +02:00
Daniel Lockyer
5875962392 Converted CRA packages to Vite
refs https://github.com/TryGhost/DevOps/issues/50

- we're moving away from CRA in favor of Vite, so this switches the last
  packages over
2023-07-27 09:43:35 +02:00
renovate[bot]
8fed1abb71 Update peter-evans/create-or-update-comment digest to 716151b 2023-07-26 08:48:51 +02:00
Daniel Lockyer
af320ab864 Fixed new package detection
- turns out new packages folders aren't generating an `A` status in `git
  diff`, so this line never worked
- if we create a `package.json` file, we can reasonably assume we're
  creating a new package, so this should fix the issues we were seeing
  with caching + new packages
2023-07-25 16:15:36 +02:00
Daniel Lockyer
adc3f8e8ee Skipped dependency caching for new packages
- in this event, we don't want to cache the dependencies because the new
  package will need to be linked to the others
- this commit should add detection for new packages and skip the cache
  if so
2023-07-25 15:14:50 +02:00
Daniel Lockyer
223109be9d Added ghost/nql-filter-expansions to TS dev script list
- this enables us to watch the directory for changes and rebuild when
  necessary
2023-07-25 13:50:45 +02:00
renovate[bot]
3f0c26534d Update peter-evans/create-or-update-comment digest to 30a3d62 2023-07-19 10:36:32 +02:00
renovate[bot]
e315d04c5f Update peter-evans/create-or-update-comment digest to 5a5a8f5 2023-07-19 08:00:05 +02:00
Daniel Lockyer
0a7fb4c881 Reimplemented canary builds on main
refs https://github.com/TryGhost/DevOps/issues/47

- this adds a canary job that waits for successful tests and then kicks
  off the Docker build step
2023-07-18 14:52:54 +02:00
Daniel Lockyer
61b4a6828d Removed pre-push hook
- we no longer allow pushing to the `main` branch, so this hook is never
  used
- if you tried to push locally, it'd fail because I've since removed
  Lerna
- this commit cleans up the hook
2023-07-17 17:10:58 +02:00
Daniel Lockyer
90adbc4865 Removed canary workflows
refs https://github.com/TryGhost/DevOps/issues/47

- we need to start building from git refs so this workflow which builds
  a tarball is no longer needed and just adds to the execution time
2023-07-14 11:24:18 +02:00
Daniel Lockyer
9f40c90e07 Switched to Nx runner for more tasks
- this switches us to using Nx for `ghost:dev`, which means we can
  configure its dependencies and ensure that the TS projects are built
  beforehand
- also switches to Nx for `ghost:archive` so we don't need to run
  `build:ts` for all `yarn` commands
2023-07-14 08:52:01 +02:00
Daniel Lockyer
e990cbba01 Configured storing Nx cache in GHA to speed up builds
refs https://github.com/TryGhost/DevOps/issues/47

- this allows us to store and restore the cache for TS builds, which
  should speed up the whole process
2023-07-14 08:52:01 +02:00
Daniel Lockyer
190a5550c3 Fixed missing command in browser tests
- `setup` no longer exists after the monorepo changes and this test
  should reflect that
2023-07-12 16:41:04 +02:00
Daniel Lockyer
757a551d1b Fixed running migrations in browser tests
- this maintains the functionality of executing migrations when running
  browser tests
2023-07-12 16:34:52 +02:00
Daniel Lockyer
2aa7da3a0b Improved monorepo tooling setup
refs https://github.com/TryGhost/DevOps/issues/45

- this switches the monorepo over to using Nx instead of Lerna, because
  we don't currently need the versioning+publishing capabilities
- this also adds an `nx.json`, which allows us to enable task caching
- also adds `build:ts` to the TS projects, which is cached for fast execution
- how these interact with the dev.js script will hopefully soon be
  reworked to be a better experience
2023-07-12 16:27:39 +02:00
renovate[bot]
ca8a03cdf6 Update peter-evans/create-or-update-comment digest to d1355c8 2023-07-12 09:34:19 +02:00
Daniel Lockyer
d38e7fd46f Disabled CI workflows for Renovate branches
refs https://github.com/TryGhost/DevOps/issues/43

- because we now enforce all commits through a PR, Renovate can no
  longer automerge commits
- this is actually a huge bonus because it simplifies a lot of the
  issues we were having with the GHA setup
- this commit removes the triggers and special handling to remove the
  duplicate executions
2023-07-11 09:30:59 +02:00
renovate[bot]
2477de3f46 Update peter-evans/create-or-update-comment digest to 540f247 2023-07-11 08:56:25 +02:00
Daniel Lockyer
f7aeb4138e Switched to printf to echo GitHub context
- printf is a little safer and should prevent issues with command
  execution within the metadata job
2023-07-10 17:54:47 +02:00
Daniel Lockyer
aa303414cb ℹ️ Bumped minimum Node 16 version to 16.14.0
fixes https://github.com/TryGhost/DevOps/issues/42

- several of our dependencies require this so making the minor bump to
  increase the version helps keep them updated
2023-07-10 16:41:34 +02:00
Daniel Lockyer
f50e878cb2 Fixed error about long filename
- echoing the data should avoid issues with piping in data through a
  file redirection
2023-07-10 15:15:12 +02:00
Daniel Lockyer
389f480c96 Removed forced pushed CI check
- we probably just want to run my logic to get the base commit for all
  pushes because otherwise the `base.sha` will be null for new branches
2023-07-10 15:03:09 +02:00
Daniel Lockyer
a5fe87cc4d Fixed caching build assets
- we shouldn't cache the build assets against the yarn.lock hash because
  the files could change independent of that file
- this bring the build caching more inline with https://github.com/getsentry/sentry-javascript/blob/develop/.github/workflows/build.yml,
  which is a big inspiration for this file
2023-07-10 14:47:08 +02:00
Daniel Lockyer
c158aa7397 Updated fetching latest base commit
- unfortunately GitHub makes this incredibly hard and this commit
  doesn't even provide a full solution, but it should allow us to fetch
  the latest commit for PRs and pushes to a branch, but not force pushes
2023-07-10 13:22:00 +02:00
Daniel Lockyer
b4d9191522 Fixed --since parameter for partial executions
- if a branch is force-pushed, the existing value is incorrect and we
  get errors from Lerna
- this switches to finding the common commit between this branch and
  the head as reported by GitHub
2023-07-10 09:55:19 +02:00
Daniel Lockyer
5b7a89d8fc Deduplicated execution check in CI workflow
- we only need this on the metadata step because it trickles down to the
  other workflows that depend on it
2023-07-10 09:55:19 +02:00
Daniel Lockyer
b6131f0631 Fixed canary build triggering
- this previously wouldn't trigger if any of the `needs` are skipped
- this switches to waiting for the actual job which checks if all
  required jobs were completed successfully
2023-07-07 15:30:22 +02:00
Daniel Lockyer
f6aeff6524 Added handling for building arch branch
refs https://github.com/TryGhost/DevOps/issues/40

- this is an experimental branch that needs a separate canary build
- these changes should help support that by allowing canary builds on
  that branch
2023-07-06 09:24:45 +02:00
Daniel Lockyer
92120324eb Updated workflow for code coverage
- added separate Admin codecov step
- removed unit test until we figure out handling for partial runs
2023-07-06 09:24:45 +02:00
Simon Backx
3d6848f5fd
Added Portal development --https option support for Safari (#17213)
no issue

This --https option allows to test Portal in Safari when the site is
hosted on https.
2023-07-05 15:04:39 +00:00
Daniel Lockyer
289e459283 Added tests for migrations
refs https://github.com/TryGhost/DevOps/issues/39

- up until now, we've had a CI job which does a really basic test for
  migrations, but it barely functions and misses bugs all the time
- this commit removes that and switches to an actual test suite for our
  migrations, so we can ensure they function as expected
- also removes the env var hack I came up with for those migrations
  tests
- this should lead to safer migrations and faster tests
2023-07-05 11:00:06 +02:00
Daniel Lockyer
2aa89f30c5 Moved dev script into subfolder
- we're going to start adding more scripts here so this helps keep the
  .github folder tidy
2023-07-05 11:00:06 +02:00
Daniel Lockyer
40e8bc09ce Optimized unit test workflow to only run for changed packages
- this implements a similar idea to linting by only running for changed
  packages, which saves ~3 minutes for this job
2023-07-05 11:00:06 +02:00
Daniel Lockyer
7ef42a49fa Implemented Playwright caching into browser-tests workflow
- this allows us to use the Playwright cache that is in place to speed
  up tests
2023-07-04 16:08:06 +02:00
Daniel Lockyer
ec94930876 Fixed only running linting on changed projects
- this configures the lint step to only run on packages that have
  changed since the previous commit
2023-07-04 14:21:05 +02:00
Daniel Lockyer
f2c2e7f687 Fixed duplicate workflow executions on PRs
- if we push to a branch, and open a PR, we'll get duplicate executions
- this fixes that by adding the same check we have elsewhere in the
  workflow
2023-07-04 12:31:00 +02:00
renovate[bot]
017a87eeeb Update actions/checkout action to v3 2023-07-04 12:16:16 +02:00
Daniel Lockyer
88954f7318 Reworked CI workflow to optimize setup
refs https://github.com/TryGhost/Toolbox/issues/609

- this rewrites the CI workflow to include a pre-test step which will
  download and cache dependencies, and will only run tests when the
  associated code changes
- this provides a huge improvement over the existing setup, and will
  save us a lot of time in CI
2023-07-04 12:03:34 +02:00
Daniel Lockyer
cb8ef8daa2 Added CI step to allow PR automerge
fixes https://github.com/TryGhost/Toolbox/issues/608

- this step will be waited on in CI config so we can ensure all tests
  have passed before automerging PRs
2023-07-03 13:45:57 +02:00
renovate[bot]
98a8727538 Update peter-evans/create-or-update-comment digest to be902ae 2023-06-28 16:23:45 +02:00
Simon Backx
331533d724
Migrated Comments-UI to TypeScript (#17129)
refs https://github.com/TryGhost/Team/issues/3504

This migrates comments-ui to TypeScript. Only `App.js` is left to
migrate, but since this isn't using hooks yet, it will need a bigger
rewrite so this will need to happen in a separate PR.
2023-06-27 14:51:37 +02:00
Daniel Lockyer
1bce363bd3
Updated linting and migration comment to improve practices
refs https://github.com/TryGhost/Toolbox/issues/602

- the new regex allows for the filename to contain seconds, which would have
  helped prevent a bug we had with migrations being in the wrong order
- mentioned filename ordering in the migration review comment to bring
  that to the forefront of the mind
2023-06-26 15:29:37 +02:00
Daniel Lockyer
8c5e2a53a9 Moved Admin-X-Settings to apps/ folder
refs https://github.com/TryGhost/Toolbox/issues/594

- we're moving all the external apps into a different folder so we can
  keep `ghost/` for internal code
2023-06-23 14:37:39 +02:00
Michael Barrett
6f5baca849
Add endpoint to record mail events (#16990)
refs https://github.com/TryGhost/Team/issues/3319
2023-06-23 12:22:01 +01:00
Simon Backx
b8d071e223 Added --https option to test Lexical in Safari in https
no issue

Safari doesn't allow to load non-https scripts in a https environment, so we need to load Lexical from https using a Caddy proxy. This adds the `--https` option to `yarn dev --lexical`.

Might consider to somehow include a caddyfile somehow in the repo to make this work everywhere without changes.
2023-06-23 10:49:20 +02:00
Daniel Lockyer
2c067aa1bb Fixed hack to kill Ghost after boot in tests
- in the migration tests we need to boot Ghost and then kill it
  afterwards
- because there was no easy way to do this, the workflow waits for 20s
  and then kills the last process ID
- aside from being a terrible idea, it means we're also just arbitrarily
  waiting for 20s, which burns time when it takes shorter to boot Ghost
- this commit implements an environment variable that will kill the
  server once it has run the whole boot process, and then fixes the
  workflow to use that
2023-06-22 15:32:48 +02:00
Simon Backx
8d6fb51908 Added Playwright tests to comments-ui
refs https://github.com/TryGhost/Team/issues/3504

Not complete yet, but contains the basic structure and a few tests that work and should run in CI.
2023-06-22 15:06:13 +02:00
Daniel Lockyer
dfd5c50b80
Configured yarn dev to allow starting Comments-UI
refs https://github.com/TryGhost/Toolbox/issues/400

- this allows for easier development with Comments-UI
2023-06-22 10:23:05 +02:00
Daniel Lockyer
76a6a14731
Added workflow for running Comments-UI tests
refs https://github.com/TryGhost/Toolbox/issues/400

- this will run whenever the comments-ui files have changed
2023-06-22 10:06:28 +02:00
Simon Backx
181185156a Added --comments option to yarn dev
refs https://github.com/TryGhost/Team/issues/3504
2023-06-21 16:41:00 +02:00
renovate[bot]
4a28678fa0 Update peter-evans/create-or-update-comment digest to c470f6f 2023-06-21 08:31:10 +02:00
Daniel Lockyer
2173fd9ef9 Moved signup-form to apps/ folder
refs https://github.com/TryGhost/Toolbox/issues/594

- we're moving all the standalone apps to a separate folder to keep them
  out of the core code and easier to find
2023-06-19 09:43:33 +02:00
Daniel Lockyer
f3894d5898 Moved Portal to apps/
refs https://github.com/TryGhost/Toolbox/issues/594

- we're moving all the standalone apps to a separate folder to keep them
  out of the core code and easier to find
2023-06-16 13:37:58 +02:00
Fabien "egg" O'Carroll
eee5eed6e2 Improved DX when working with collections
This was missing from the initial package creation, adding the command here
means that `yarn dev` in the top level will watch and build collections
2023-06-16 11:08:13 +02:00
Daniel Lockyer
7a124a6901 Moved announcement-bar to apps/
refs https://github.com/TryGhost/Toolbox/issues/594

- we're moving all the standalone apps to a separate folder to keep them
  out of the core code and easier to find
2023-06-14 12:28:55 +02:00
Daniel Lockyer
fa43a0236b Moved Sodo-Search into apps/
refs https://github.com/TryGhost/Toolbox/issues/594

- this is the first of a set of commits to move our "apps" into the
  `apps/` folder, so we don't mix Ghost core and standalone apps
2023-06-14 12:10:57 +02:00
renovate[bot]
c67e1b505e Update peter-evans/create-or-update-comment digest to c6c9a1a 2023-06-14 08:06:27 +02:00
Daniel Lockyer
01e90dfb65 Extracted regression tests to a separate workflow
refs https://github.com/TryGhost/Toolbox/issues/592

- this commit extracts the regression tests into a separate workflow
- this means they run in parallel and reduce the time we have to wait
  for DB tests in general
- also fixes a test that was reliant on being run after the E2E
  tests (!)
2023-06-13 16:47:19 +02:00
renovate[bot]
27a9cdb67b Update peter-evans/create-or-update-comment digest to 5825e57 2023-06-13 08:38:23 +02:00
Daniel Lockyer
abf45dcd14
Added note about requiring Node 18 to use yarn dev
refs https://ghost.slack.com/archives/CSF1ATVTJ/p1686134251084789

- whilst Ghost supports Node 16, only Node 18 and above comes with
  `--watch`, which we use in the `yarn dev` script
2023-06-09 15:11:59 +02:00
Jono M
089a3f7aaf
Added playwright config to admin-x-settings (#16941)
no issue
2023-06-06 11:29:28 +12:00
renovate[bot]
21bedec086 Update peter-evans/create-or-update-comment digest to 542d5c2 2023-06-02 13:38:15 +02:00
Daniel Lockyer
50618921c6
Configured Portal's dev output to be quieter
- this avoids noise in the CLI when you're developing, as we don't care
  what port the preview server has started on
2023-06-02 11:40:01 +02:00
renovate[bot]
a8848bc7c6 Update peter-evans/create-or-update-comment digest to 6534843 2023-06-02 11:02:16 +02:00
renovate[bot]
b1e9fed6b1 Update actions/stale action to v8 2023-06-02 10:41:35 +02:00
Daniel Lockyer
ec5f0eefd2 Bumped CI to use Node 18 for majority of tests
refs https://github.com/TryGhost/Toolbox/issues/528

- we're moving towards making Node 18 our recommended version, so that
  involves ensuring all of CI is running Node 18
- we still have some Node 16 matrix runs to ensure compatibility
2023-06-02 09:34:22 +02:00
Simon Backx
a2a79cec0e Added support for yarn dev --signup
no issue

Added support for `--signup` to `yarn dev`. This will make sure that the signup form preview server is served (with rebuilding) and can be used in admin (instead of using the published version). This is also automatically started when using `yarn dev --all`, but with a twist:

If you only run `yarn dev --all`, it will only build and watch the production build of the signup form. If you use `yarn dev --signup` or `yarn dev --all --signup` it will also serve the demo app on `http://localhost:6173`.
2023-06-01 10:20:37 +02:00
Simon Backx
ced0a3e792 Fixed signup-form-tests GitHub workflow
refs https://ghost.slack.com/archives/C02G9E68C/p1685446707169999

- `actions/setup-node` has a bug where it doesn't parse paths where the path is pretty-printed with colors, so we have to explicitly disable colors
- Added whitespace change inside signup-form to trigger new CI run
2023-05-30 13:41:38 +02:00
Simon Backx
cc83b3661a
Added signup-form e2e tests to CI (#16860)
refs https://github.com/TryGhost/Team/issues/3298

This adds a new GitHub workflow that runs the signup-form E2E tests,
only when files in `ghost/signup-form` have changed
2023-05-25 10:28:48 +02:00
Daniel Lockyer
dd6559b3c8
Disabled project codecov status by default
refs https://github.com/TryGhost/Toolbox/issues/583

- this disables the project codecov, as it's better to determine the
  codecov by the individual flags we have set
2023-05-24 14:18:11 +02:00
Daniel Lockyer
2daf4bad5c
Reconfigured codecov config
refs https://github.com/TryGhost/Toolbox/issues/583

- removed default config so we just have separate numbers for the flags
- added threshold to flags config so we can protect against small
  changes in variance
2023-05-24 13:04:38 +02:00
Daniel Lockyer
1adbd7d507
Added codecov config to repo
refs https://github.com/TryGhost/Toolbox/issues/583

- this commit adds config for codecov because this repo needs some
  changes that aren't suitable for the global config
- this probably needs some adjusting over time but should get us started
  for now
2023-05-24 11:09:13 +02:00
Daniel Lockyer
3e12c0ea54
Split CI database tests into separate types
- this will allow us to see which set of tests are consuming the most
  amount of time in CI
- in order to split apart the commands, I've had to override the
  coverage thresholds for integration+regression tests in order to keep
  c8 happy
- also sprinkled some more labels into the workflows to make things
  clearer to read
2023-05-22 19:34:17 +02:00
Daniel Lockyer
ade8a1f5f4
Removed debugging statements
- these snook their way into my previous commit
2023-05-22 18:19:41 +02:00
Daniel Lockyer
6c85c2c195 Fixed uploading single code coverage to Codecov
fixes https://github.com/TryGhost/Toolbox/issues/583

- we currently upload the codecov for unit tests and e2e/admin tests
  separately
- unfortunately this means that when one submits before the other, the
  codecov % will be incorrect
- this leaves a big red cross on the commit until the other coverage is
  uploaded
- this should fix that by upload the coverage in one step once CI is
  happy
2023-05-22 18:10:23 +02:00
Daniel Lockyer
03122cde77
Added support to yarn dev for --announcement-bar
refs https://github.com/TryGhost/Toolbox/issues/584

- we should strive to provide a good development experience by keeping
  the number of "other" setup steps to a minimum
- this adds support for the Announcement Bar app to the dev script so a
  simple flag spins up the dev server too
2023-05-22 15:31:28 +02:00
renovate[bot]
f6e7f15c84 Update peter-evans/create-or-update-comment digest to c9cf0f5 2023-05-19 12:18:51 +02:00
Daniel Lockyer
58539c355b
Added --adminX functionality to yarn dev
fixes https://github.com/TryGhost/Toolbox/issues/581

- this adds support for spinning up AdminX within the `yarn dev` script
  with zero other steps needed
2023-05-19 10:34:06 +02:00
Daniel Lockyer
3dd4d3943b
Fixed creating patch branches on the last released version
- without the `--match=v*`, this matches the last tag which might come
  from something like Portal or Admin-X, which isn't correct
2023-05-18 19:47:14 +02:00
Daniel Lockyer
8127a481ca
Added --lexical support to yarn dev
refs https://github.com/TryGhost/Team/issues/3240

- this adds support for `--lexical` to `yarn dev`, which sets the
  env variable so Ghost uses a local Lexical instance and not the CDN version
2023-05-18 15:14:36 +02:00
Daniel Lockyer
d9ea8f2827
Removed release workflow
refs https://github.com/TryGhost/Toolbox/issues/580

- this has been moved to internal automations so we don't need the
  workflow here
2023-05-15 08:48:42 +02:00
Daniel Lockyer
b403dd8a81
Fixed path to slack-build action
refs 990b477a31

- I've moved this into the Actions repo so it's easier to maintain
2023-05-12 13:11:16 +02:00
renovate[bot]
7639b7b69e Update peter-evans/create-or-update-comment digest to 7dfe4b0 2023-05-12 11:49:10 +02:00
renovate[bot]
be28ae77b8 Update peter-evans/create-or-update-comment digest to 594dca4 2023-05-12 11:27:37 +02:00
Fabien 'egg' O'Carroll
474e683011
Added @tryghost/in-memory-repository (#16769)
This is the first pass at an abstract class for our in-memory repository
implementations. It's based off of the existing implementations and
should speed up local development and deduplicate code
2023-05-10 09:23:16 -04:00
Fabien "egg" O'Carroll
9ac8301f5b Revert "Added @tryghost/in-memory-repository"
This reverts commit 905578d590.
2023-05-09 19:38:06 -04:00
Fabien "egg" O'Carroll
905578d590 Added @tryghost/in-memory-repository
This is the first pass at an abstract class for our in-memory repository
implementations. This should speed up local development and deduplicate code
2023-05-09 18:46:48 -04:00
Daniel Lockyer
16ea824f71
Fixed building Admin in development mode for browser tests
- I switched over `build` to run in production mode because we now do
  `lerna run build` during the release process, but this was bundling
  development assets
- this adds `build:dev` and switches the browser test to use that, so
  they should use the development assets moving forwards
2023-05-05 12:13:11 +02:00
Fabien "egg" O'Carroll
ac2adfc964 Fixed browser tests on CI
We need to run `yarn build` in the top level to ensure that all packages are built
2023-05-03 14:38:26 -04:00
Fabien "egg" O'Carroll
b9565bc290 Migrated @tryghost/post-revisions to TypeScript!
This is an initial start to using TypeScript in our non-core Ghost packages.

- Adds a prepare script to build the project after installing deps
- Adds an initial tsconfig.json which is compatible with our node env
- Migrates all of the code to TypeScript, including tests
- Updates tests to use ts-node so that we don't need to compile the tests
- ts-node is installed at the top level because the env is weird with lerna and
  doesn't work otherwise
- Updates the yarn dev script to build the project with the --all and --revisions flag
2023-05-03 14:32:31 -04:00
Fabien "egg" O'Carroll
ed674981e6 Updated npm scripts to support packages with a build step
- Updates the prepare script in the top level to run prepare on packages, so
  that packages can be built when running `yarn`

- Updates the build script in ghost/core to run build on packages, so that
  packages are built before being monobundled

- Updates monobundle to be a dependency and use the new TryGhost repo, which
  includes some minor fixes and improvements, such as supporting devDeps

- Updates the GitHub workflows to run the build command in the top level
  directory rather than ghost/core so that other packages are built, too.
2023-05-03 14:32:31 -04:00
Fabien "egg" O'Carroll
be28283b36 Added support for --all and --offline to yarn dev
The --all flag will run all of our apps and services including Stripe
The --offline flag will disable any network services, e.g. Stripe
2023-05-01 13:00:37 -04:00
Daniel Lockyer
ada28188a3
Dropped Node 14 from CI
refs https://github.com/TryGhost/Toolbox/issues/570

- Node 14 is now EOL so we don't need to support and run tests for it
2023-05-01 15:07:20 +02:00
Daniel Lockyer
f2f3f5cf79
Allowed secrets to passthrough to re-usable workflow
- this is needed so we can pass the secrets down the workflow chain
2023-04-20 08:52:29 +01:00
Daniel Lockyer
fcb100141b
Allowed secrets to be passed to child workflows
- we need this so the Canary build can access our repo secrets
2023-04-19 15:13:52 +01:00
Daniel Lockyer
e30a386e67
Updated PR template to just auto-generate the summary
- Copilot for PRs is cool but quite verbose, so I think just showing the
  summary is more useful
2023-04-10 10:35:52 +02:00
Daniel Lockyer
aaaedbf715
Removed extra line in PR template
- turns out some of the descriptions are actually pretty good, but we wanna reduce the amount of lines in the template
2023-04-07 09:24:50 +02:00
renovate[bot]
9217a5fd9c Update peter-evans/create-or-update-comment digest to e21423b 2023-04-06 19:56:55 +02:00
Daniel Lockyer
5536d0ae9e Removed hiring link from PR template
- we're currently pausing hiring for new product engineers to let the
  new ones settle in
2023-04-05 15:09:56 +02:00
Daniel Lockyer
52aadd4134
Added Copilot prompts to PR template
- we're beta testers for the feature so let's give it a go
2023-04-05 15:04:11 +02:00
Daniel Lockyer
edf96ee976 Enabled --prefer-offline in CI to reduce network requests
- by default, yarn will try and fetch dependencies from the network, and
  fallback to local cache if the network is down
- `--prefer-offline` switches that around so we can take advantage of
  local caches before defaulting to the network
- hopefully this speeds up dependency install steps in CI
2023-04-05 14:22:03 +02:00
renovate[bot]
c5316966e3 Update peter-evans/create-or-update-comment digest to 3383acd 2023-04-05 09:46:26 +02:00
Daniel Lockyer
11183e34b6
Added workflow to label i18n PRs
- this helps us track i18n PRs by labelling them as such
2023-04-05 09:28:43 +02:00
renovate[bot]
db7d52b8ca Update peter-evans/create-or-update-comment digest to 9c63576 2023-04-05 09:25:07 +02:00
renovate[bot]
bfeb2a0169 Update peter-evans/create-or-update-comment digest to 3d6c0b9 2023-04-04 09:04:23 +02:00
Daniel Lockyer
ec9181921b
Fixed preventing git submodules from being committed
- because we now ignore git submodule changes, they didn't show up in
  `git diff --cached...`, so it was possible to get submodules to be
  committed
- you can re-enable submodules to be shown with `--ignore-submodules=none`
- this implements that
- we never want to allow submodules to be committed, so I've removed the
  prompt for faster feedback
2023-03-28 12:16:46 +02:00
Daniel Lockyer
846a9cdafc
Fixed pre-push hook running when pushing to fork
- this prevents the unit tests running if you're pushing to a fork,
  which we don't care about because it doesn't block the upstream `main`
2023-03-23 17:31:06 +01:00
Daniel Lockyer
56b407f1f4
Added pre-push hook to run unit tests on changed packages
fixes https://github.com/TryGhost/Toolbox/issues/532

- we should protect against failures entering `main` which could be
  avoided by running a quick unit test beforehand
- this reintroduces Lerna as it supports parallelisation and `--since`,
  to run linting and unit tests on packages that have changed since
  upstream
2023-03-23 11:27:43 +01:00
Daniel Lockyer
a287912cf2
Added .eslintcache caching to CI
refs https://github.com/TryGhost/Toolbox/issues/532

- this will cache the `.eslintcache` files in packages, which should
  dramatically speed up linting in CI
2023-03-23 10:41:13 +01:00
Daniel Lockyer
6207766ce7
Migrated from nodemon to native Node --watch
fixes https://github.com/TryGhost/Toolbox/issues/493

- `nodemon` doesn't properly wait for graceful shutdown if there's a job
  running in Ghost when it tries to reload, so it ends up producing
  errors because two versions of Ghost are started
- Node 18 added a `--watch` flag, which reloads if any required file is
  changed
- switching from nodemon to this native feature should keep the
  core functionality the same but fix this edge case that disrupts the
  development flow
2023-03-21 15:57:41 +01:00
Daniel Lockyer
0ec539f084
Switched browser tests back to standard CI machines
- these larger machines aren't giving us much benefit and cost more
  money, so we're better off with the standard machines right now
2023-03-20 21:34:18 +01:00
Daniel Lockyer
cad7082aee Added concurrency group to Browser tests
- by using the same group (the workflow name), we should be able to
  limit the concurrency to 1 execution, which might help with some
  flaky tests we keep seeing
2023-03-17 16:35:17 +01:00
Daniel Lockyer
a6966913dd Switched around CI machine allocation
- now the vast majority of our flaky tests are gone, we don't need the
  bigger machines
- however, browser tests seem to be a little slow, so we can try giving
  them more power than the defaults
- this should also help with resource contention when we have multiple
  jobs running at the same time, as we have double the numbers of
  runners on the free machines
2023-03-17 16:35:17 +01:00
renovate[bot]
101549b3df Update asdf-vm/actions action to v2 2023-03-17 15:15:35 +01:00
Daniel Lockyer
3302f4125e
Added support to yarn dev for --search to launch Sodo-Search
refs https://github.com/TryGhost/Toolbox/issues/400

- this makes development more fluid by allowing developers to use the
  local Sodo-Search code
2023-03-17 11:51:42 +01:00
Daniel Lockyer
f06ee87787
Removed myself as a CODEOWNER for migrations
refs https://ghost.slack.com/archives/C02G9E68C/p1678726901892459

- following a procedure update, I am no longer required to review
  migrations so I can remove myself as a CODEOWNER for those paths
2023-03-13 18:06:35 +01:00
Sam Lord
8b978b1eb3 Switch to using @tryghost/action-trigger-metric
no issue

Was previously using a repo in sam-lord's personal Github.
2023-03-13 11:19:42 +00:00
Daniel Lockyer
0c6a0c64d1
Revert "Temporarily removed Slack notification from failed browser tests"
This reverts commit 9fde77a95c.
2023-03-09 10:30:53 +01:00
renovate[bot]
d7a3e961c6 Update peter-evans/create-or-update-comment digest to 44526e3 2023-03-09 10:18:15 +01:00
Daniel Lockyer
9fde77a95c
Temporarily removed Slack notification from failed browser tests
- this is becoming far too noisy and there are some dependency issues we
  need to fix first
2023-03-07 12:18:28 +01:00
Daniel Lockyer
91e507d6f1
Removed Firefox from Admin CI runs
refs https://ghost.slack.com/archives/C02G9E68C/p1677753889082979

- Firefox tests have historically been flaky in CI and a real
  distraction when developing
- Firefox is, unfortunately :(, not a widely used browser at only 2.9%
  of global market share
- we've not had any Firefox-specific bugs that were detected in CI for
  a very long time, so it doesn't add anything anyway
2023-03-02 11:54:01 +01:00
Daniel Lockyer
50d467b1e8 Removed non-recommended Node version DB tests for SQLite3
- given SQLite3 is only supported for development, we don't really care about
  running tests on Node versions which aren't the recommended version
- this saves 2 jobs per CI run, which helps improve the health of CI in
  general
2023-03-02 11:36:26 +01:00
renovate[bot]
6184bbcceb Update peter-evans/create-or-update-comment digest to b1fa5d5 2023-03-01 08:45:32 +01:00
renovate[bot]
41e01f6531 Update peter-evans/create-or-update-comment digest to c5a7a98 2023-02-28 19:09:58 +01:00
Daniel Lockyer
bf675e471f
Switched to general linux CI runner label
- turns out our concurrency on these 8 core machines is only 10 jobs, so
  everything is running really slowly
- by opening up to `linux`, we allow executions on 4, 8 and 16 core
  machines with a total concurrency of 30
2023-02-22 12:18:12 +01:00
Daniel Lockyer
ea2a80583b
Reduced CI machines to 8 core machines
- we're seeing low availability for the 16 core machines and they might
  be constrained as everyone jumps to the highest spec
- in theory, we don't need super fast multi-core machines to run tests,
  so I'll try with 8 core ones
2023-02-22 10:19:03 +01:00
Daniel Lockyer
eea7c9c6f8
Bumped GHA Runners to larger machines
- this reverts commit 8d18530f60
- I had to disable them before because there was an issue with
  availability
2023-02-20 18:12:02 +01:00
renovate[bot]
3e4cb3f85e Update peter-evans/create-or-update-comment digest to 300bfad 2023-02-16 15:01:36 +01:00
renovate[bot]
aa6242eb6d Update peter-evans/create-or-update-comment digest to 521ce1b 2023-02-07 09:45:48 +01:00
Daniel Lockyer
a8726036f5
Added Slack notification to Playwright tests
refs https://ghost.slack.com/archives/C02G9E68C/p1675094899771479

- this allows the team to know sooner when we've broken the Playwright
  tests
2023-01-31 08:56:51 +01:00