Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): align pnpm install across all workflows #5920

Merged
merged 3 commits into from Mar 8, 2024

Conversation

bjoerge
Copy link
Member

@bjoerge bjoerge commented Mar 6, 2024

Description

This aligns how we install dependencies across all our workflow definitions. It's using the same approach as @binoy14 previously added for the e2e test workflow.

What to review

  • Should we always pass --config.ignore-scripts=true when running pnpm install? (side note: why the config.-prefix and not just --ignore-scripts?)

Testing

  • CI is taking care of it!

Notes for release

n/a internal

Copy link

vercel bot commented Mar 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Mar 8, 2024 4:25pm
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 8, 2024 4:25pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Mar 8, 2024 4:25pm

Copy link
Contributor

github-actions bot commented Mar 6, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Mar 6, 2024

Component Testing Report Updated Mar 8, 2024 4:30 PM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 30s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 5s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 12s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 30s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 58s 15 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ❌ Failed (Inspect) 1m 3s 17 0 1
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 11s 6 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 19s 9 0 0

- name: Install project dependencies
run: pnpm install

- name: Build CLI
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was probably just leftover cruft, and there was no point in running build during the install step, so moved building to right before running the tests below

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually I misunderstood this, so the way this is working is it's running the build step in install job, so it builds for node18 and node20 then it caches the build and passes it to the test job which runs for a mix of node + shard matrix if the build step is still needed we should keep the cache so it doesn't need to build on each matrix which would take quite long for 4 shards if cache is not available.

I thought the build step isn't required at all but maybe that will not work. Happy to chat more on this

Copy link
Member Author

@bjoerge bjoerge Mar 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought the build step isn't required at all

You're right! Jest is configured to use the dev aliases, so tests can run from source. Although discovered that the validation tests, requires these aliases to be registered inside the worker thread that it runs.

Opened a separate PR to address this here: #5927

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified this PR to instead remove build entirely from the test workflow, so it should run a lot faster now.

Unit tests doesn't require packages to be built since jest is configured to use the devAliases, routing imports from `<package>` to `<package>/src`.
Copy link
Contributor

@binoy14 binoy14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice thank you for doing it.

Small note the install job and the cleanup jobs can be removed for the test action since they are not doing anything

@bjoerge bjoerge added this pull request to the merge queue Mar 8, 2024
Merged via the queue into next with commit f103967 Mar 8, 2024
35 of 36 checks passed
@bjoerge bjoerge deleted the fix/ci-align-pnpm-install branch March 8, 2024 16:48
juice49 pushed a commit that referenced this pull request Mar 13, 2024
* fix(ci): align pnpm install across all workflows

* fix(ci): skip running build before unit tests

Unit tests doesn't require packages to be built since jest is configured to use the devAliases, routing imports from `<package>` to `<package>/src`.

* fixup! fix(ci): skip running build before unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants