GSA-TTS / tts.gsa.gov

Making the website work for people who make websites work
https://federalist-a2423046-fe43-4e75-a2ef-2651e5e123ca.sites.pages.cloud.gov/preview/gsa-tts/tts.gsa.gov/echo-summer20203/
Other
4 stars 3 forks source link

Update Node version in Build / Test workflow #103

Closed wesley-dean-gsa closed 1 month ago

wesley-dean-gsa commented 1 month ago

The current Pa11y and proposed Test workflows hard-code Node version 17. Version 17 is no longer supported by either the Node or the Pages communities.

wesley-dean-gsa commented 1 month ago

While on BEARS, I used nvm (Node Version Manager) to manage the version of Node that's used:

https://github.com/GSA-TTS/usagov-benefits-eligibility/blob/main/.github/workflows/test.yml#L20-L27

Adopting this (or something like it) will allow us to use nvm for Node version management; in the above case, the .nvmrc only includes 18 so nvm will use the most recent version of Node version 18.

Currently, Pages uses nvm and supports the "active and maintenance LTS" releases of Node with the default version being 18 (specifically, 18.19.0).

wesley-dean-gsa commented 1 month ago

The Node release / support documentation is here: https://github.com/nodejs/release#release-schedule

wesley-dean-gsa commented 1 month ago

In #105, the Pa11y workflow was updated to use the live preview URLs generated by Cloud.gov Pages. As a result, we're no longer building the site, so we don't need to install requirements from package.json. All of that said, we're no longer tied to the version of Node required by the site, just the tool. Pa11y currently supports versions 18 and 20. As the current default for Cloud.gov Pages is Node 18.19.0, we just told it to use version 18 and let the system figure it out.

tl;dr: the Pa11y workflow no longer needs to be updated.

wesley-dean-gsa commented 1 month ago

FWIW, we went from 16.15.1 => 18.19.0. This update required a change in the .eleventy.js configuration to make work locally; however, as a part of #136, we integrated that change which, apparently, is backwards-compatible.