Create a Husky pre-commit hook to update the Playground docker image version #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Every time that the
@playwright/test
is updated, the.playwright_docker_version
gets outdated. If it is a patch update nothing happens, but if it is a major/minor update multiple times the tests fail because the versin of the Docker image and the version of the package don't match, so a manual work is required in those cases. This is pretty common during Dependabot updates.This pull request creates a small Husky hook before any commit to check if the
@playwright/test
package has been updated. If the package has been updated, it updates the.playwright_docker_version
file with the proper version and add it to the commit changes.