fix(workflows): exclude node versions that don't have arm distributions from mac test workflow
This PR contains a:
- [X] bugfix
- [ ] new feature
- [ ] code refactor
- [x] test update
- [ ] typo fix
- [ ] metadata update
Motivation / Use-Case
The test workflow for mac is broken because osx-arm64 versions of Node.js don't exist before v16.1.0. The macos-latest image now uses arm64, while the macos-latest-large image that uses x64 is available. When no architecture is specified for setup-node, it will use the system architecture, so by using an x64 mac image, it should successfully find Node 10.x, 12.x, 14.x, etc.
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: SlyryD / name: Ryan Dorson (779f48d194397c77fe4053b24403eaa49949b672)
Ping @ersachin3112 to kick off the workflows so we can see whether this change fixes them. Thanks!
Weird, github requires payment, although actions are free for us
Weird, github requires payment, although actions are free for us
Is that related specicially to the macos-latest-large image?
I think yes...
I think yes...
Updated just to exclude node versions 10-14 in the macos test workflow.
Let's remove sudo npm i -g npm at all from CI
Yea sudo is a bad idea
Travelling now, will try again next week.
Let's remove
sudo npm i -g npmat all from CI
Updated
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
a0ed6c7) to head (779f48d). Report is 7 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #140 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 12 12
Branches 3 3
=========================================
Hits 12 12
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
New iteration where I force Python 3.12 for node-gyp, which has the distutils module. Alternative is to do one of the following to install distutils for newer versions of Python:
python3 -m pip install setuptools
brew install python-setuptools
But I figured that would take more iterations to get right.
New iteration where I force Python 3.12 for node-gyp, which has the distutils module. Alternative is to do one of the following to install distutils for newer versions of Python:
python3 -m pip install setuptools brew install python-setuptoolsBut I figured that would take more iterations to get right.
@alexander-akait, new iteration with installing python setuptools. Didn't realize that I didn't git add my files 2 weeks ago.
Ah I've seen this Windows build failure before with finding the VS2022 version... but I found a workaround that I can't explain why it works. So I'd have to dive deeper for this one.
Ah I've seen this Windows build failure before with finding the VS2022 version... but I found a workaround that I can't explain why it works. So I'd have to dive deeper for this one.
I'm thinking this might be why the original pipelines upgraded the version of npm...
Ah I've seen this Windows build failure before with finding the VS2022 version... but I found a workaround that I can't explain why it works. So I'd have to dive deeper for this one.
I'm thinking this might be why the original pipelines upgraded the version of npm...
Yeah so latest node 14 has npm 6.14.18 which has node-gyp 5.1.1, and according to this VS2022 support was added in node-gyp 8.4.0: https://github.com/nodejs/node-gyp/issues/2958. Let me try something like this for Windows: https://github.com/nodejs/node-gyp/blob/main/docs/Updating-npm-bundled-node-gyp.md
@alexander-akait, ready for another try :D Since the windows image has VS2022, we need node-gyp >= 8.x. The node-gyp 8.x dependencies do not support Node.js 10.x, so rule that version out for Windows. For Node.js 12.x and 14.x, update node-gyp to 8.x to get tests running.
Dang... I got the same error locally in Windows but only when I had some NPM environment variables set. I guess they are set on the Windows image as well.
@alexander-akait, I have another iteration that tries to mimic these instructions better. Hope it works!
Yay! I'm not sure why macos-latest - Node v12.x and macos-latest - Node v14.x are pending though.
@alexander-akait, I think you would need to update the branch protection rules to remove the requirement for mac node 12 and 14 checks. I see other repos owned by webpack-contrib requiring node 18, 20, and 22 for example. Thanks!
Thanks a lot