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

chore(end-to-end-tests): run 'npm ci' in e2e tests #2944

Merged
merged 1 commit into from
Jun 28, 2021

Conversation

rwaskiewicz
Copy link
Member

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe): Backport of fix(testing): puppeteer v10 support #2934

What is the current behavior?

When developers run npm run test.end-to-end, we cd to the test/end-to-end directory and run npm 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 this package.json script results in the following:

  • this changes the format of the 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 Stencili
  • when running in CI, we don't have reproducible NPM installs for this script (since we're not using npm ci)

What is the new behavior?

Run npm ci as a part of this script in lieu of npm i

  • This preserves the lockfile version when developing locally (running npm ci with NPM 7 in this directory does not change the lockfile)

Does this introduce a breaking change?

  • Yes
  • No

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.

@rwaskiewicz rwaskiewicz merged commit 7f7571a into master Jun 28, 2021
@rwaskiewicz rwaskiewicz deleted the rwaskiewicz/end-to-end-package-lock branch June 28, 2021 15:48
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