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
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
- 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
- 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`
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