Commit Graph

307 Commits

Author SHA1 Message Date
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
Daniel Lockyer
672d6b3f90
Added migration label to PRs containing migrations
- this helps us to filter PRs for migrations in the future
2023-01-26 15:46:47 +01:00
renovate[bot]
bac75b5d1d Update peter-evans/create-or-update-comment digest to e0e8aa0 2023-01-26 12:46:01 +01:00
renovate[bot]
e4d79a0bcf Update peter-evans/create-or-update-comment digest to 2cabc73 2023-01-20 14:11:31 +01:00
Daniel Lockyer
1af31bab1a ℹ️ Added support for Node 18
refs https://github.com/TryGhost/Toolbox/issues/488

- Node 18 is now LTS so we're adding support for it
- this adds Node 18.12.1 (the latest security release) to our supported
  ranges and CI
2023-01-04 11:27:39 +01:00
Daniel Lockyer
99c775be23
ℹ️ Bumped minimum Node version to 14.18.0
refs https://github.com/TryGhost/Toolbox/issues/488

- this is needed so we can bump some dependencies
- given how old these versions are, users should probably update past
  this anyway
2023-01-03 18:54:39 +01:00
renovate[bot]
9d577a2d5a Update peter-evans/create-or-update-comment digest to 66af805 2023-01-03 18:48:48 +01:00
Daniel Lockyer
8d18530f60
Revert "Bumped GHA Runners to larger machines"
- this reverts commit 921e9f4069
- we've been seeing issues with job scheduling so I'm reverting this for
  now
2023-01-03 17:56:03 +01:00
Daniel Lockyer
f512bd8eff
Bumped CI Node version to 16
refs https://github.com/TryGhost/Toolbox/issues/488

- Node 16 is our recommended version so we should run tests using that
2023-01-03 14:39:31 +01:00
Daniel Lockyer
921e9f4069 Bumped GHA Runners to larger machines
- this switches the testing CI over to larger 16 core machines we now
  have access to
2023-01-03 10:53:13 +01:00
renovate[bot]
24274fec0b Update actions/stale action to v7 2023-01-02 18:03:54 +01:00
renovate[bot]
ed6abe60be Update peter-evans/create-or-update-comment digest to 69c3c2d 2022-12-13 11:04:20 +07:00
Daniel Lockyer
7f8f5205e2
Updated suggested fix when yarn dev fails
- `yarn fix` is much more likely to fix dependency problems because it
  clears the cache and re-runs `yarn`
2022-12-12 17:23:51 +07:00
Daniel Lockyer
f8dbda4629
Disabled browser tests on pull requests
- these tests shouldn't be running on pull requests yet as they don't
  have access to the environment secrets they currently require
2022-12-06 15:49:23 +07:00
Sam Lord
fe99a000f1 Enable browser job on workflow_dispatch
refs: https://github.com/TryGhost/Toolbox/issues/481
2022-12-05 14:48:39 +00:00
Sam Lord
d3716007bf
Fixed browser-based tests running in CI
refs: https://github.com/TryGhost/Toolbox/issues/481

* Correctly setup environment variable to run both local & staging browser-based tests
* Use non-production Ghost Admin build, since production builds require HTTPS to use Stripe Connect
2022-12-05 13:39:10 +00:00
Sam Lord
74d0fee125 Set a default environment for browser tests
no issue
2022-12-02 17:04:04 +00:00
Sam Lord
00d223991d Improved browser test CI integration
refs: https://github.com/TryGhost/Toolbox/issues/481
2022-12-02 17:04:04 +00:00
Daniel Lockyer
bc0b1f6adc Added CI for running Playwright tests
🚧
2022-12-02 17:04:04 +00:00
Sam Lord
8b80233ae6 Added sample Portal test to PlayWright suite
refs: https://github.com/TryGhost/Toolbox/issues/479
2022-11-24 17:47:04 +00:00
Daniel Lockyer
6a3ea02fed Enabled codecov coverage uploading for E2E tests
refs https://github.com/TryGhost/Toolbox/issues/475

- this enables uploading to codecov for the E2E tests, and separates the
  unit + E2E test results with flags
2022-11-17 12:44:54 +07:00
Daniel Lockyer
e1a6a083a5
Removed nested quotes
- for some reason these aren't working with the GitHub Actions workflow
2022-11-04 10:52:06 +07:00
Daniel Lockyer
0609ec2525
Fixed create-release-branch failing with non-core tags
- the create-release-branch workflow works by getting the most recent
  tag, bumping it and using that to create the new tag
- now we've moved Portal into the monorepo, we've got two different
  types of flags, but the Portal ones aren't valid semver so the
  workflow fails if the most recent tag is one for Portal
- this fixes that by ensuring we only fetch tags matching the pattern we
  use for tagging Ghost
2022-11-04 10:38:22 +07:00
Daniel Lockyer
077ff89960
Removed pre-commit linting on non-main branches
- our use-case for this is to ensure that people don't push to
  `main` without running linting, as this can block CI from passing
  until the linting issue is resolved
- however, it can become annoying to run linting on non-main branches,
  especially when you just want to WIP some changes without caring for
  linting
- generally speaking, anyone who creates commits on a non-main branch is
  going to open them as a PR, so linting is run anyway
- this commit get the branch name and only runs linting if we're on
  `main`
2022-10-27 11:47:10 +07:00
Daniel Lockyer
3da7040e32
Removed verbose error logging for yarn dev failures
fixes https://github.com/TryGhost/Toolbox/issues/459

- in the situation where the `yarn dev` command fails, it pumps out a
  massive error message, which is incredibly distracting to the dev
  experience
- this changes the output to just be a log line with some suggestions on
  how to fix it
2022-10-27 11:25:43 +07:00
renovate[bot]
14dfd618c3 Update peter-evans/create-or-update-comment digest to 7305482 2022-10-20 10:24:34 +07:00
Daniel Lockyer
31235dcd04
Improved commit message docs in contributing guide
- `refs/closes` can be confusing to those who are not familiar with GitHub when we actually mean "use refs or fixes (or closes)"
- we generally don't want to use emojis for alpha features because adding it to the release notes is unnecessary until the feature is GA
2022-10-13 09:56:14 +07:00
Daniel Lockyer
e11636b6f8
Fixed execution path for lint commands in lint-staged
refs https://ghost.slack.com/archives/C02G9E68C/p1665497363885949

- we've seen an issue with `lint-staged` in the Admin package because it
  doesn't pick up the lint-todo file, so it incorrectly flags linting
  issues that we're ignoring
- this is happening because it runs the command from cwd, where the lint
  exclusion file does not exist
- thankfully, `lint-staged` has `--relative` which will run the command
  from the directory where the command is defined in config, so `ghost/admin`
  in our case, and that means the lint file is present and picked up
2022-10-11 21:54:58 +07:00
Daniel Lockyer
a37b2cd24e Switched to Husky + lint-staged for git hooks
- up until this commit, git hooks were only used by a handful of people
  because they were a pain:
  - they'd only be set up when you did `yarn setup`
  - the existing hooks ran `yarn lint` on all projects, which was
    incredibly slow
- as a result, not many of us actually had them enabled, but this would
  cause issues in CI because people were pushing un-linted commits
- other JS projects tend to use husky to automate the git hook setup and
  lint-staged to speed up linting on changed files
- this commit switches to using them both
  - `lint-staged` only runs `eslint` on staged JS files that are about to
    be committed - if there's a linting error, it will stop the commit
  - I've configured the pre-commit hook to successfully exit in CI because we
    don't want to run pre-commit hooks right now
- this means we can remove Grunt - yay!
2022-10-10 15:10:48 +07:00
Daniel Lockyer
0ecc6dc238
Added note about fetching the Stripe secret token
- this helps debug what is happening and when
2022-10-06 16:56:05 +07:00
Daniel Lockyer
7308bb9122
Switched to accessing config loader directly
- I lowered the code coverage on the repo to the point where
  it started failing because I added a new export to the config library
- this wasn't easy to add tests for because the existing config tests
  use the loader directly and not the library export
- instead, I'm just going to make the dev script access the loader, and
  make a note to clean this up in the future when we pull out the config
  module
2022-10-06 16:25:29 +07:00
Daniel Lockyer
0bfbee5523
Fixed yarn dev --stripe ignoring HTTPS configured sites
- because the cwd of `.github/dev.js` is not `ghost/core`, it doesn't
  pick up config.local.json files, so any configuration you set in there
  isn't applied
- this meant that developers with HTTPS configured locally couldn't use
  `--stripe` because it wouldn't configure the Stripe listening URL
  correctly
- this adds an exports to the config lib to allow passing options in,
  which I then utilize to pass the directory that config resides in
- this should fix the aforementioned problem with HTTPS
2022-10-06 15:58:51 +07:00
Daniel Lockyer
a35d388543
Fixed missing return when fetching Stripe key fails
- we should protect against the stripe command throwing an error because
  it's not installed or it errors etc
2022-10-06 15:42:19 +07:00
Daniel Lockyer
28cc88c2cd
Added --stripe support to yarn dev
refs https://ghost.slack.com/archives/C02G9E68C/p1665043198507819?thread_ts=1664955131.950719&cid=C02G9E68C

- this adds support for `yarn dev --stripe` which will spin up the
  Stripe CLI to listen for webhooks, and configures Ghost with the
  secret key it needs to communicate
- also fixes a minor typing error with a missing `env: {}`
2022-10-06 15:32:08 +07:00
Daniel Lockyer
ab99109bbf
Added support for running Portal from the monorepo
refs https://github.com/TryGhost/Toolbox/issues/426

- this adds support for `--portal` in `yarn dev` to support the upcoming
  migration of Portal into the monorepo
- also adds the Portal folder to the ignorelist for nodemon so Ghost
  doesn't bootloop
2022-10-05 11:51:06 +07:00
Hannah Wolfe
0b41fbf102
Updated hiring links
- Ghost is still hiring, but we've split our product engineer into two and the URL has changed
2022-09-30 19:56:26 +01:00