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

ci: remove cypress reinstalls, commit package-lock files right when bumping #2069

Closed
wants to merge 12 commits into from

Conversation

ThibodeauJF
Copy link
Contributor

@ThibodeauJF ThibodeauJF commented Jun 8, 2022

https://coveord.atlassian.net/browse/KIT-1719

Example issue

Created KIT-1718 branch since the latest release

Headless versions are the same in the files (1.70.1)
https://github.com/coveo/ui-kit/blob/KIT-1718/packages/headless/package.json#L18
https://github.com/coveo/ui-kit/blob/KIT-1718/packages/headless/package-lock.json#L3

Yet we get this error in the e2e test https://github.com/coveo/ui-kit/runs/6798309712?check_suite_focus=true

/opt/hostedtoolcache/node/16.15.0/x64/bin/npm ci
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or 	
npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
	npm ERR! Invalid: lock file's @coveo/[email protected] does not satisfy @coveo/[email protected]

We somehow have a lockfile with the wrong version with some e2e cypress tests.

@github-actions
Copy link

github-actions bot commented Jun 8, 2022

Thanks for your contribution @ThibodeauJF !
When your pull-request is ready to be merged, check the box below to merge it

  • Merge! :shipit:

@github-actions
Copy link

github-actions bot commented Jun 8, 2022

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 200.9 200.9 0
search 292.6 292.6 0
insight 189.7 189.7 0
product-listing 213.9 213.9 0
product-recommendation 197.2 197.2 0
recommendation 196 196 0

- uses: actions/cache@v2
id: cypress-cache
with:
path: ~/.cache/Cypress
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As of Cypress version 3.0, Cypress downloads its binary to the global system cache - on linux that is ~/.cache/Cypress. By ensuring this cache persists across builds you can save minutes off install time by preventing a large binary download.

https://docs.cypress.io/guides/continuous-integration/introduction#Caching

@ThibodeauJF ThibodeauJF marked this pull request as ready for review June 8, 2022 20:03
@ThibodeauJF ThibodeauJF requested review from a team and mbenkirane-coveo as code owners June 8, 2022 20:03
@ThibodeauJF
Copy link
Contributor Author

ThibodeauJF commented Jun 9, 2022

@btaillon current solution isn't fully working, I need a bit of help with the angular package, not sure how it works differently than others here...

Error: Error: src/app/app.module.ts:3:35 - error TS2307: Cannot find module '@coveo/atomic-angular' or its corresponding type declarations.

@ThibodeauJF ThibodeauJF requested a review from a team as a code owner June 9, 2022 19:59
Copy link
Member

@olamothe olamothe left a comment

Choose a reason for hiding this comment

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

I'd be mega tempted to approve, but seems like the e2e are still failing. Do you need help on that front to investigate what's going on ?

@@ -18,6 +18,7 @@ async function checkoutLatestMaster() {

async function bumpVersionAndPush() {
try {
// But wait, there's more! https://github.com/lerna/lerna/blob/main/commands/version/README.md#lifecycle-scripts
Copy link
Member

Choose a reason for hiding this comment

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

image

@ThibodeauJF
Copy link
Contributor Author

@olamothe there's the angular e2e sample not having the @coveo/atomic-angular package installed that's still a bit problematic

@ThibodeauJF ThibodeauJF changed the title ci: do not make cypress reinstall packages ci: remove cypress reinstalls, commit package-lock files right when bumping Jun 9, 2022
@ThibodeauJF
Copy link
Contributor Author

will reopen later perhaps

@ThibodeauJF ThibodeauJF closed this Jun 9, 2022
@ThibodeauJF ThibodeauJF deleted the KIT-1719 branch June 28, 2022 19:59
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.

3 participants