Commit Graph

380 Commits

Author SHA1 Message Date
Daniel Lockyer
8fb7da4be0 Bumped Node versions in CI
- we should be running most of CI on Node 20
- this has fallen out of sync because we declare the version in so many
  places
- to help with this, I've extracted the Node version to an env var, and
  re-used that across the workflow
2024-10-23 13:23:35 +02:00
renovate[bot]
cb453febe9 Update benchmark-action/github-action-benchmark action to v1.20.4 2024-10-23 13:22:37 +02:00
Michael Barrett
5492e64988
Updated admin-x-activitypub URL to point at shorter cached version (#21378)
no refs
2024-10-23 11:36:16 +01:00
Laurent Goderre
e2519848c1
Set CI timezone to non-UTC to catch timezone-related issues (#19676)
- this helps catch test failures that are due to us writing timezone dependent code

Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2024-10-16 15:35:47 +02:00
Hannah Wolfe
269ed3891d
Configured i18n tests to run for sodo-search (#21199)
ref https://github.com/TryGhost/Ghost/pull/21055

- Now that sodo-search has i18n, we should run i18n tests when this
package changes as well
2024-10-03 07:56:02 -05:00
Daniel Lockyer
c58cbe4fb9 Bumped CI fetch-depth to 1000
refs https://ghost.slack.com/archives/C02G9E68C/p1727704490753759

- if you open a PR and it becomes outdated enough such that the base
  commit was 100 commits ago, the workflow starts to fail
- to help prevent this, we can increase it by 1000, which should more
  than cover enough use-cases but still keep checkout quick
2024-09-30 16:11:47 +02:00
Daniel Lockyer
607dee288b Cleaned up branch triggers
- we don't use `arch` anymore, and `2.x` and `3.x` are ollldddddd, so
  we're not going to run CI on them
2024-09-30 09:38:28 +02:00
Daniel Lockyer
d86f94db2d Fixed looking up users with special username characters
- users like `renovate[bot]` have brackets in the username
- this breaks the command and it exits with `exit code 3.`
- to fix this, we can encode the username before passing it in
2024-09-30 09:38:28 +02:00
Daniel Lockyer
75afbb4f2a Added missing if-statement to CI workflow
- without this, we're constantly purging the cache, which exceeds the
  rate limit afforded to us from jsdelivr
2024-09-26 19:51:07 +02:00
Fabien O'Carroll
5f637af3cf Added workflow for deploying @tryghost/admin-x-activitypub
ref https://linear.app/tryghost/issue/AP-438

This will build and release the Admin X activitypub app when we bumb the
package.json version and push to `main`
2024-09-26 23:24:26 +07:00
Daniel Lockyer
f19c01a11f Added workflow changes to support PR deploys to staging
ref https://linear.app/tryghost/issue/DEV-31/staging-deploys-of-feature-branchesprs

- we want the ability to ship a PR to staging, so we can test and QA
  without merging to `main`
- most of the infrastructure is already in place for this, so it's
  mostly a case of wiring it all up
- this commit will send a slightly different payload to the build
  process, to indicate it's coming from a PR
- I've also added a check that the user is a member of the org, so we
  don't get random builds from non-members
- to trigger this, we should be able to add the `deploy-to-staging`
  label and it Just Works :TM:
2024-09-26 15:38:35 +02:00
Daniel Lockyer
eebd198027
Fixed requiring passing tests for canary builds
- this disappeared due to a regression in a previous commit
2024-09-25 10:29:19 +02:00
Daniel Lockyer
ca691e99e8 Fixed branch name in canary workflow
- `github.ref_name` is a more reliable way to find the branch name than
  we were previously doing
2024-09-24 10:46:44 +02:00
Daniel Lockyer
24447f438e Passed along branch name to canary job
ref https://linear.app/tryghost/issue/DEV-20/faster-builds

- we should pass along the branch name in the metadata field so it's
  more DRY for canary builds in the future
2024-09-24 10:17:22 +02:00
Daniel Lockyer
ae8f8f128b Added version bumping script to repo
ref https://linear.app/tryghost/issue/DEV-25/move-version-bumping-logic-into-ghost-repo

- we're slowly migrating our build code into the OSS repo, which means
  we need to move scripts over
- we have this as a bash script, but I've rewritten it to JS so it's a
  little more maintainable
- this script will just bump the version in the package.json files and
  set the GHA output
2024-09-24 09:11:54 +02:00
Daniel Lockyer
7c346c28eb Enabled Nx caching on main
- we should be able to trust Nx enough that we can sustain the build
  cache across commits, which will speed up the workflow because we
  don't need to rebuild our TS projects all the time
2024-09-23 15:19:31 +02:00
Daniel Lockyer
5791be4937 Merged setup steps in CI
- we don't need these to be separate steps and having them separate
  actually makes CI slower because it takes ~10-12s for GitHub to start
  new jobs
2024-09-23 14:48:17 +02:00
Sam Lord
625c89e37f
Added the ability to run browser tests using local Portal (#20990)
ref DOGM-32

Using the dev script as a template, this script runs the tests with
local copies of the applications needed instead of the released CDN
versions
2024-09-12 15:55:47 +01:00
Daniel Lockyer
77df6186f0 Removed auto-labeller for PRs
- this was an early attempt to group PRs together by labels, so we can
  triage PRs easier, but it's not finished and actually producing more
  noise than signal
- we might want to re-add this in the future, but for now, silence 🧘
2024-08-29 11:06:00 +02:00
Hannah Wolfe
2720791434
Updated CI workflow to run on PR label/unlabel
- We have browser tests which only run if the browser tests flag is added to the PR
- The label has to be present on PR creation, which is hard to remember/doesn't fit with various workflows
- The default type of action for the pull_request trigger are opened, synchronize, reopened
- This PR adds labeled and unlabeled to those, which I think will help us to run the tests as expected
- The expectation is that adding the browser test label will now trigger the tests to run
2024-08-29 09:24:37 +01:00
Princi Vershwal
f984fbd47e
🎨 Improved the performance of the /members/events/ aggregated_click_event endpoint (#20790)
Ref https://linear.app/tryghost/issue/ONC-216/improve-the-performance-of-the-membersevents-aggregated-click-event
2024-08-22 18:26:10 +05:30
Chris Raible
f147167a29
Added SQLite and MySQL check to migration review checklist (#20708)
no issue

- knex can behave differently with SQLite and MySQL, which can cause
migrations to behave differently in each database. This PR adds a check
to the migration review checklist to remind us to test the migration in
both databases before merging.
2024-08-01 13:38:59 -07:00
renovate[bot]
54bd9a1ab4 Update benchmark-action/github-action-benchmark action to v1.20.3 2024-05-20 10:39:02 +01:00
renovate[bot]
15569145f3 Update benchmark-action/github-action-benchmark action to v1.20.1 2024-05-09 10:23:48 +02:00
Joe Grigg
c744740761 Updated canary build CI to use the main Moya build pipeline
ref ENG-807
2024-05-01 13:22:01 +01:00
Daniel Lockyer
10e81aeed8
ℹ️ Added support for Node 20
ref https://linear.app/tryghost/issue/ENG-765/add-support-for-node-20

- this adds support for Node 20 to Ghost and CI, as Node 20 is an LTS
  version and we should pick it up
2024-04-18 13:17:21 +02:00
renovate[bot]
e8ea2e4db0 Update GitHub Artifact Actions to v4 2024-04-18 12:36:39 +02:00
renovate[bot]
4ab31122a4 Update actions/cache action to v4 2024-04-18 12:36:07 +02:00
renovate[bot]
2d6a361bb5 Update dorny/paths-filter action to v2.12.0 2024-04-16 09:44:01 +02:00
Joe Grigg
d0c1814a1c Fixed incorrect branch for canary build
no-issue
2024-03-25 15:02:10 +00:00
Joe Grigg
7c5b8355e4 Switched canary build to use the new faster build pipeline
no-issue
2024-03-25 14:36:02 +00:00
Sam Lord
167a442ffe Free ubuntu-latest machines now also have 4 cores
refs: https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/

This should still allow us to run tests in 8~ minutes without paying for the VM time
2024-01-18 09:35:30 +00:00
Daniel Lockyer
d65a95836b Revert "Enabled app build artifact caching in CI"
This reverts commit 617d3a6ffc.
2023-12-11 15:32:46 +01:00
Daniel Lockyer
617d3a6ffc Enabled app build artifact caching in CI
fixes https://github.com/TryGhost/DevOps/issues/120

- we've seen errors in CI where the unit tests for the apps folder are
  being run concurrently, but the build assets are not present so
  multiple builds are happening for the same folder
- this leads to errors because Vite tries to cleanup or build folders
  at the same time
- this should fix that by eagerly building the apps and caching the
  output so unit tests run quicker
2023-12-11 12:28:27 +01:00
Daniel Lockyer
c695497598 Switched to actions/labeler for PR labeling
fixes https://github.com/TryGhost/DevOps/issues/111

- this allows us to add labels based upon the contents in a smarter way
  than the previous workflow
2023-11-20 11:43:58 +01:00
Simon Backx
e3cdc24d6b
Added test to test default theme against linked gscan version (#19020)
fixes GRO-32

If we ever introduce errors in the linked source theme and linked gscan
version combination, this test will catch it.
2023-11-16 12:03:00 +00:00
Daniel Lockyer
e2be6dbf14 Configured submodules to clone in performance tests
refs https://github.com/TryGhost/DevOps/issues/105

- we should include submodules in the checkout so the Ghost boot is
  representative of booting Ghost with a theme
2023-11-15 14:08:32 +01:00
Daniel Lockyer
566f2055d0 Moved GitHub context logging to job
- this stops the entire context from being output in the env vars, so it
  cleans up the output at the top of each job
2023-11-15 13:54:20 +01:00
Daniel Lockyer
18afd39193 Removed NODE_ENV env var from perf tests
refs 05977d5c26

- this seems to break things, will investigate once this is merged
- also adds showing output flag so debugging is easier
2023-11-15 13:35:41 +01:00
Daniel Lockyer
05977d5c26 Added boot time performance test to CI
refs https://github.com/TryGhost/DevOps/issues/105

- this will run a small benchmark on the boot time for Ghost, and push
  the stats to another repository which has GitHub Pages enabled, so we
  can visualise the change over time
- will only run on pushes to `main` so we don't pollute the stats with
  commits from PRs
- just a test for now to see if we get stable numbers
2023-11-15 13:24:56 +01:00
renovate[bot]
3909de2f17 Update actions/setup-node action to v4 2023-11-08 13:29:13 +01:00
Daniel Lockyer
6900c1f2b3 Configured CI to run Ghost-CLI tests on Node 18
refs https://github.com/TryGhost/DevOps/issues/75

- this will install v4 using Node v16 and then switch to v18 as we're
  about to drop support for Node v16
2023-10-25 17:50:56 +02:00
Daniel Lockyer
f6dfe05c30 Added guard against non-code changes to run CI tests
- we don't want to run browser tests if no code has changed
2023-10-25 12:06:00 +02:00
Daniel Lockyer
c5c6f84c7d Added CI check to ensure i18n translations are in sync
fixes https://github.com/TryGhost/DevOps/issues/91

- this adds a CI job that will run i18n tests if any of the packages
  that use it have changed
- this helps prevent translations from going out of sync
2023-10-25 12:06:00 +02:00
Sam Lord
11b9e8a73f Switch to 4-core runners for browser tests
refs: https://github.com/TryGhost/DevOps/issues/78

This number of cores has been approved, will test with 1 browser per core, and 1 browser for every two cores
2023-10-17 12:40:19 +01:00
Daniel Lockyer
e699facc03 Cleaned path to Playwright reports
- this is cleaner and follows the pattern as other jobs do
2023-10-16 17:37:42 +02:00
Daniel Lockyer
18f55d6af0 Moved browser E2E tests into CI workflow
refs https://github.com/TryGhost/DevOps/issues/78

- this allows us to take advantage of the dependency caching and metadata
  workflows, to reduce the overall execution time and duplicate logic
2023-10-16 13:45:22 +02:00
Sam Lord
4815aa6e7f
Parallelise browser tests
refs: https://github.com/TryGhost/DevOps/issues/78

Re-introduce parallel browser tests

These were adding in a previous PR, but the difference between local
running tests and using CI introduced failures.

Added additional fixes to ensure the Stripe API key is used in the CLI when running in CI.
2023-10-13 11:42:39 +00:00
renovate[bot]
c2b0442846 Update peter-evans/create-or-update-comment digest to ac8e650 2023-10-13 07:48:15 +02:00
Peter Zimon
e68db848dc
AdminX: reroute settings-x to settings (#18360)
refs. https://github.com/TryGhost/Product/issues/3949

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-10-09 08:12:46 +01:00