chore(end-to-end-tests): run 'npm ci' in e2e tests #2944
Merged
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.
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locallyand any changes were pushedPull request type
Please check the type of change your PR introduces:
What is the current behavior?
When developers run
npm run test.end-to-end
, wecd
to thetest/end-to-end
directory and runnpm i
. These tests are meant to run using Node v12.X (and NPM v6.X), as that's the minimum version of Node that Stencil supports today. Because development for Stencil is done in NPM v7, running thispackage.json
script results in the following:test/end-to-end/package-lock.json
file, which is getting committed in community PRs and needs to be deliberately avoided by the dev team when working on Stencilinpm ci
)What is the new behavior?
Run
npm ci
as a part of this script in lieu ofnpm i
npm ci
with NPM 7 in this directory does not change the lockfile)Does this introduce a breaking change?
Other information
I'm also open to changing the lockfile version in this PR as well -
npm is flexible enough to allow us to upgrade the lockfile, and continue running the end to end tests with Node 12/npm 6.
My real goal is to minimize the amount of churn in community PRs/avoid having to deal with it myself when developing for Stencil. But having reproducible runs of
test.end-to-end
in CI is a great bonus as well.Long term, we should discuss our e2e testing strategy for multiple versions of Node, keeping the packages in
test/end-to-end/package.json
up to date, etc.