Automattic / simplenote-electron

Simplenote for Web, Windows, and Linux
https://app.simplenote.com
GNU General Public License v2.0
4.69k stars 553 forks source link

Run lint and tests in Buildkite CI #3206

Closed mokagio closed 1 week ago

mokagio commented 1 month ago

Moves the lint and unit tests CI steps from CircleCI to Buildkite.

It uses an experimental approach to npm that:

  1. Runs npm ci instead of npm install, as recommended for CI jobs
  2. Uses caching, but since we're using npm ci, which recreates node_modules, only caches the NPM cache.
  3. Has a gate at the start of the pipeline to create the cache if necessary, so that we'll avoid race conditions where multiple jobs might attempt to upload the NPM cache simultaneously.

I'm a bit unsure about the approach to be honest. Is the cache gate necessary? What are the chances of race condition? Besides, the performance of using vs not using the cache with npm ci do not seem to be that different, which makes me question whether it's worth having in the first place.

Keen to hear what you think. I'd still propose to merge as is and see how it behaves. This investigation has a broader scope that just this project, as we have new Electron apps that might use this new approach.

Test

See green CI.

Release

N.A.

mokagio commented 1 month ago

Requested an @Automattic/apps-infrastructure review for feedback on the npm approach.

@codebykat the head is release/2.22.0 because I'm wishfully hoping to port the rest of the setup before it's time to cut the final build. At worst, we'll ship 2.22.0 on the old infra and continue the upgrade later.

mokagio commented 1 week ago

Superseded by #3204