nathanhleung / install-peerdeps

💻 A command-line interface to install an NPM package and its peer dependencies automatically.
https://www.npmjs.com/package/install-peerdeps
MIT License
296 stars 20 forks source link

Move tests to GitHub Actions, add Windows Tests #127

Open karlhorky opened 3 years ago

karlhorky commented 3 years ago

From #124:

karlhorky: what do you think about adding Windows end-to-end tests to install-peerdeps? To catch any errors like this in the future? GitHub Actions and seemingly also Travis CI have the ability to run on Windows...

nathanleung: I think that's a great idea — don't want to break this package for Windows users in the future if I don't have to.

ljharb: travis-ci is slow and dying; i'd suggest github actions. I can convert the existing tests to github actions if @nathanhleung is OK with that; windows tests can go in separately/in parallel as a separate workflow.

nathanleung: It would be awesome if you could do that, thanks!

karlhorky: Cool, if this is the way to go, maybe that could be done with a matrix - here's our approach for Preflight: https://github.com/upleveled/preflight/blob/main/.github/workflows/build-lint-test.yml#L7-L10

cc @ljharb @nathanhleung

ljharb commented 3 years ago

I'll make a PR soon that converts the tests to GH.

nathanhleung commented 3 years ago

I'll make a PR soon that converts the tests to GH.

Thank you!

karlhorky commented 3 years ago

Hey @ljharb I guess no time to work on this one yet, right?

Would really like to have some failing tests so that we can iron out the Windows dependency problems here, which are not very visible to many users probably, but can cause big issues dependency versions (https://github.com/facebook/create-react-app/issues/10465#issuecomment-769344975).

Originally I thought that https://github.com/nathanhleung/install-peerdeps/pull/126 fixed the issue, but after checking again, I've found incorrect versions are still getting installed on Windows - see my comment.

ljharb commented 3 years ago

No, I haven't had time yet, unfortunately. However, I've recently made some updates to my shared actions that should make the job much easier :-) I'll plan to take a crack at it today.

ljharb commented 3 years ago

Got a branch in progress; looks like some tests are failing tho (which were passing on master 2 months ago).

ljharb commented 3 years ago

Put up the PR: #139. Some help debugging the pnpm failures would be appreciated.

karlhorky commented 3 years ago

Nice, thanks! I'll try to get some time to take a look soon! Maybe we can make a test case for this eslint-config-react-app issue (either as part of this or in a followup PR)

ljharb commented 3 years ago

I'd like to get the tests migrated off travis first; after which extending them with more cases, or on more platforms, would be great.

karlhorky commented 3 years ago

Great, now that https://github.com/nathanhleung/install-peerdeps/pull/139 has been merged, we just have:

  1. Add Windows tests
  2. Add test for eslint-config-react-app to test situations like https://github.com/facebook/create-react-app/issues/10465
karlhorky commented 2 years ago

@ljharb do you think you'll have time in the next weeks / months to add Windows tests?

Would be great to get these tests so that the ERR undefined issue on Windows can finally be reproduced, investigated and fixed (issues #228, #193, #150, #128)

ljharb commented 2 years ago

I’d be happy to review a PR, but i have no windows machines so I’m probably not the best person to do it.