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.
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
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.
- 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
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 (!)
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
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`.
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
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
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
- 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
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
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
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
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
- 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
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
- 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.
- 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
- 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
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
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
- 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
- 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
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
- 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
- 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
- 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
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