Commit Graph

263 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
renovate[bot]
f6e7f15c84 Update peter-evans/create-or-update-comment digest to c9cf0f5 2023-05-19 12:18:51 +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
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
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
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
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
renovate[bot]
9217a5fd9c Update peter-evans/create-or-update-comment digest to e21423b 2023-04-06 19:56:55 +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
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
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
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