Update node version in JHA (12 -> 18, 22) #341
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.
Please check if the PR fulfills these requirements:
npm audit
was checked, applicable vulnerabilities were updatednpm run build
passesnpm run lint
has no unexpected errorsnpm run format
was run on changed filesnpm run test:e2e:headless
)Please specify the type of change this PR introduces (Bug fix, feature addition, content update, chore, etc.):
Updates build matrix in jha-web workflow to use both 18 and 22.
Update source strategy in build.yaml to use nodejs-18 rather than 12. (It's preferable to run JHA in 22 where possible for maximum compatibility with the pdf-js package, but it will build in 18, and that'll do for now while we wait for 22 to go into LTS and eventually become an image in the Redhat registry. Both of those options are better than 12, which fails everywhere.)
This change was manually added to OpenShift as well.
In summary:
Local development-- use node 22
jha-web.yaml Test step-- runs unit/e2e tests in 22 (node 18 can't properly run the unit tests due to pdf-js compatibility, but the application works fine in the browser and the tests pass in node 22)
jha-web.yaml Build step-- runs in 18 and 22 (should pass in both)
jha-web.yaml Image-build action-- set to nodejs-18 in the build.yaml and OpenShift (planned to upgrade to 22 when the LTS image becomes available)
Additional Notes:
npm run format
changes will happen at a later date.