Commit Graph

406 Commits

Author SHA1 Message Date
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