realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.72k stars 564 forks source link

Upgrade `actions/upload-artifact` to v4 and refactoring `pr-realm-js` workflow #6530

Open kraenhansen opened 6 months ago

kraenhansen commented 6 months ago

We're currently using actions/upload-artifact v3, which uses Node v16 and we're getting warnings on CI for this. As per the release notes for actions/upload-artifact@v4 it's suggested to follow this guide to perform the migration: https://github.com/actions/upload-artifact/blob/main/docs/MIGRATION.md

In its current form, no tests are initiated before prebuilds are uploaded for all platforms, which slows down the feedback loop when pushing changes to a PR branch. Since the upload-artifacts@v4 remove a feature we're depending on for this flow (implicit merging of artefacts that share name), we should take this opportunity to refactor our workflow into jobs where a test run only depends on the upload of the prebuilt artefact that it actually needs to complete.

In addition to this, we should consider optimising which prebuilds are actually produced and which tests we run:

sync-by-unito[bot] commented 6 months ago

➤ PM Bot commented:

Jira ticket: RJS-2748

kraenhansen commented 4 months ago

https://github.com/realm/realm-js/issues/6446 seems related to this.

kraenhansen commented 4 months ago

If we choose to refactor the workflow such that test jobs depend on the upload of the prebuilt artifact that it actually needs, we could probably revert https://github.com/realm/realm-js/pull/5729 as well.