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: fix playwright cache #25527

Merged
merged 2 commits into from Jan 31, 2024

Conversation

BobbieGoede
Copy link
Member

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

I think playwright cache in the ci action has been ignored (always downloadin & installing) since replacing playwright with playwright-core. This (should) fix the cache.

Main thing I wanted to fix is that the action sometimes fails running this command:

$env:PLAYWRIGHT_VERSION="$(pnpm ls --depth 0 --json -w playwright | jq --raw-output '.[0].unsavedDependencies[\"playwright\"].version')"

With the following error:

jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
.[0].unsavedDependencies[\"playwright\"].version                         
jq: 1 compile error

Honestly I'm not sure why this command doesn't consistently error, and when it doesn't error it resolves to null, and I think that since there is no local playwright installed with version null it downloads and installs instead. This will likely reduce flakiness for the erroring actions.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

Copy link

stackblitz bot commented Jan 31, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@BobbieGoede
Copy link
Member Author

Maybe it should still be using unsavedDependencies instead of devDependencies?

@BobbieGoede
Copy link
Member Author

Looks like caching is working now for the Ubuntu actions, but not quite for Windows.. Not sure why that is, at least playwright version parsing is working for Windows now as well.

@BobbieGoede
Copy link
Member Author

Actually caching should work for Windows actions as well, I think the cache just still unset on the first run πŸ˜…

@danielroe danielroe merged commit 957b968 into nuxt:main Jan 31, 2024
35 checks passed
@github-actions github-actions bot mentioned this pull request Jan 31, 2024
manniL pushed a commit that referenced this pull request Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants